Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to declare a variable named $primary-color with the value #3498db.
SASS
$primary-color: [1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the
# before the color code.Using variable name as value.
Omitting the semicolon.
✗ Incorrect
In Sass, variables start with a dollar sign
$. To assign a color value, write $primary-color: #3498db;.2fill in blank
mediumComplete the code to declare a variable $font-size with the value 1.5rem.
SASS
$font-size: [1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using px instead of rem.
Writing units in wrong order like
rem1.5.Omitting units.
✗ Incorrect
The correct way to assign a font size in rem units is
1.5rem.3fill in blank
hardFix the error in the variable declaration to set $margin to 2rem.
SASS
$margin [1] 2rem;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using equal sign
= instead of colon.Omitting the colon.
Using semicolon instead of colon.
✗ Incorrect
In Sass, variables are assigned using a colon
:, not an equal sign.4fill in blank
hardFill both blanks to declare $padding as 10px and $border-radius as 5px.
SASS
$padding: [1]; $border-radius: [2];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the values for padding and border-radius.
Forgetting semicolons.
Using wrong units.
✗ Incorrect
Assign
10px to $padding and 5px to $border-radius using colons and semicolons.5fill in blank
hardFill all three blanks to declare variables $color, $font-weight, and $line-height with values #e74c3c, bold, and 1.6 respectively.
SASS
$color: [1]; $font-weight: [2]; $line-height: [3];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around
bold (not needed in Sass).Forgetting the colon or semicolon.
Mixing up the order of values.
✗ Incorrect
Assign the hex color
#e74c3c to $color, the string bold to $font-weight, and the number 1.6 to $line-height.