A. Missing colon ':' between parameter and default value
B. Using '=' instead of ':' for default value
C. Parameter name cannot start with '$'
D. Mixin name cannot be 'card'
Solution
Step 1: Check parameter default syntax
The parameter $bg-color is followed by 'blue' without a colon ':' separator.
Step 2: Identify correct syntax
Default values require a colon ':' like '$bg-color: blue'.
Final Answer:
Missing colon ':' between parameter and default value -> Option A
Quick Check:
Default parameter syntax needs ':' [OK]
Hint: Default values need ':' after parameter name [OK]
Common Mistakes:
Omitting colon ':' between parameter and value
Using '=' instead of ':'
Thinking parameter names can't start with '$'
5. You want a Sass function that returns a color, defaulting to red if no argument is given. Which function correctly uses default parameter values and returns the color?
hard
A. @function get-color($color = red) { @return $color; }
B. @function get-color($color: red) { return $color; }
C. @function get-color($color) { @return $color or red; }
D. @function get-color($color: red) { @return $color; }
Solution
Step 1: Check default parameter syntax in functions
Default values use colon ':' like '$color: red'.
Step 2: Verify return statement syntax
Sass uses '@return' to return values, not 'return'.
Step 3: Compare options
@function get-color($color: red) { @return $color; } uses correct default and '@return'. @function get-color($color: red) { return $color; } uses 'return' which is invalid in Sass.
Final Answer:
@function get-color($color: red) { @return $color; } -> Option D
Quick Check:
Default param ':' and '@return' needed [OK]
Hint: Use ':' for defaults and '@return' to output value [OK]
Common Mistakes:
Using '=' instead of ':' for defaults
Using 'return' instead of '@return'
Trying to use 'or' inside return statement
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.