Test your basic understanding of SCSS syntax, features, and usage with these beginner-friendly questions designed for anyone new to SCSS.
SCSS Variable Declaration
Which option correctly declares a variable named 'main-color' with the value blue in SCSS?
- @main-color: blue;
- var main-color = blue;
- #main-color: blue;
- $main-color blue;
- $main-color: blue;
Nesting Selectors in SCSS
How do you properly nest a '.child' selector inside a '.parent' selector in SCSS?
- .parent { child { color: red; } }
- .parent u003E .child [ color: red; ]
- .parent :child { color: red; }
- .parent { .child { color: red; } }
- .parent ( .child { color: red; } )
Importing Files
Which statement allows you to import another SCSS file named '_buttons.scss' into your current SCSS file?
- @use 'buttons';
- require 'buttons';
- @import 'buttons';
- import 'buttons';
- @include 'buttons';
Mixins Usage
What is the correct way to include a mixin named 'rounded-corners' in a CSS class using SCSS?
- @mixin rounded-corners;
- @use rounded-corners;
- @call rounded-corners;
- #include rounded-corners;
- @include rounded-corners;
SCSS Comments
Which option will create a comment in SCSS that does NOT appear in the compiled CSS output?
- // This is a comment
- -- This is a comment
- ** This is a comment **
- /* This is a comment */
- # This is a comment