Complete the code to create a simple offset class with a left margin.
.offset-1 { margin-[1]: 1rem; }
The margin-left property moves the element to the right by adding space on the left side.
Complete the Sass loop to generate offset classes from 1 to 4.
@for $i from 1 through 4 { .offset-#[1] { margin-left: #{$i}rem; } }
In Sass, variables start with $. So $i is used inside the loop.
Fix the error in the Sass code to generate offset classes with correct margin values.
@for $n from 1 through 3 { .offset-#[1] { margin-left: $nrem; } }
The variable $n must be interpolated inside the class name and used correctly with units in the property.
Fill both blanks to create offset classes with margin-left in rem units using a Sass loop.
@for $x from 1 through 5 { .offset-#[1] { margin-left: $x[2]; } }
The class name uses #{$x} to insert the number. The margin-left uses rem units for spacing.
Fill all three blanks to generate offset classes with margin-left in rem units and add a hover effect changing margin to zero.
@for $num from 1 through 3 { .offset-#[1] { margin-left: $num[2]; &:hover { margin-left: [3]; } } }
The class name uses #{$num}. Margin-left uses rem units. On hover, margin-left resets to 0 to remove offset.