SASS Cheat Sheet 2026
The 30 highest-yield SASS facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.
70 questions
70 min time limit
75.00% to pass
- What does the Sass `@while` directive do? → Repeats a block as long as a condition remains true
- Which directive lets a selector inherit the styles of another selector? → @extend
- What is the purpose of `@return` in a Sass function? → It specifies the value the function outputs
- Which loop directive iterates over each item in a list or map? → @each
- Which Sass function increases the opacity of a color? → opacify() / fade-in()
- What is the main purpose of the `@use 'sass:meta'` module? → To inspect and manipulate Sass code and metadata
- What does the `rgba()` function do in Sass? → Creates a color with red, green, blue, and alpha channels
- How do you include a mixin in Sass? → @include mixin-name;
- To define the mixin, which directive is used? → @mixin
- How do you use `@each` to iterate over a Sass map? → @each $key, $value in $map { }
- What does the following Sass produce: `@for $i from 1 through 3 { .mt-#{$i} { margin-top: #{$i * 4}px; } }`? → .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
- How do you pass arguments to a Sass mixin? → @include mixin-name($arg1, $arg2);
- What is the key advantage of `@use` over `@import` in Sass? → It scopes variables and mixins to a namespace, avoiding global pollution
- Which Sass feature allows you to write modular, nested property declarations? → Property nesting with namespace prefix
- Which Sass function returns the number of items in a list? → list.length()
- Which keyword sets a default value for a Sass variable only if it is not already defined? → !default
- Which Sass function retrieves a value from a map? → map.get()
- Which file extension uses the indented, brace-free Sass syntax? → .sass
- How do you break out of a Sass `@while` loop? → Set the loop condition to false
- Which Sass feature allows a mixin to accept a variable number of arguments? → Variadic arguments using `$args...`
- What does `meta.function-exists('function-name')` return? → True if the function exists, false otherwise
- Which Sass function checks if a map has a specific key? → map.has-key()
- Which Sass function extracts the alpha (opacity) value from a color? → alpha() / opacity()
- How do you define a Sass function? → @function name($args) { @return value; }
- How do you check if a variable is null in a Sass `@if` statement? → @if $variable == null { }
- How do you apply styles only when an element is the first child using `&` in Sass? → `.element { &:first-child { } }`
- What does the Sass `lighten()` function do? → Increases the HSL lightness of a color by a fixed amount
- How do you perform division in modern Sass (Dart Sass)? → math.div($a, $b)
- True/False: The SASS code is run from the command line using the "sass input.scss output.css" command. → B) True
- Which Sass data type stores key-value pairs? → Map
Turn these facts into recall: