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
  1. What does the Sass `@while` directive do? Repeats a block as long as a condition remains true
  2. Which directive lets a selector inherit the styles of another selector? @extend
  3. What is the purpose of `@return` in a Sass function? It specifies the value the function outputs
  4. Which loop directive iterates over each item in a list or map? @each
  5. Which Sass function increases the opacity of a color? opacify() / fade-in()
  6. What is the main purpose of the `@use 'sass:meta'` module? To inspect and manipulate Sass code and metadata
  7. What does the `rgba()` function do in Sass? Creates a color with red, green, blue, and alpha channels
  8. How do you include a mixin in Sass? @include mixin-name;
  9. To define the mixin, which directive is used? @mixin
  10. How do you use `@each` to iterate over a Sass map? @each $key, $value in $map { }
  11. 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; }
  12. How do you pass arguments to a Sass mixin? @include mixin-name($arg1, $arg2);
  13. What is the key advantage of `@use` over `@import` in Sass? It scopes variables and mixins to a namespace, avoiding global pollution
  14. Which Sass feature allows you to write modular, nested property declarations? Property nesting with namespace prefix
  15. Which Sass function returns the number of items in a list? list.length()
  16. Which keyword sets a default value for a Sass variable only if it is not already defined? !default
  17. Which Sass function retrieves a value from a map? map.get()
  18. Which file extension uses the indented, brace-free Sass syntax? .sass
  19. How do you break out of a Sass `@while` loop? Set the loop condition to false
  20. Which Sass feature allows a mixin to accept a variable number of arguments? Variadic arguments using `$args...`
  21. What does `meta.function-exists('function-name')` return? True if the function exists, false otherwise
  22. Which Sass function checks if a map has a specific key? map.has-key()
  23. Which Sass function extracts the alpha (opacity) value from a color? alpha() / opacity()
  24. How do you define a Sass function? @function name($args) { @return value; }
  25. How do you check if a variable is null in a Sass `@if` statement? @if $variable == null { }
  26. How do you apply styles only when an element is the first child using `&` in Sass? `.element { &:first-child { } }`
  27. What does the Sass `lighten()` function do? Increases the HSL lightness of a color by a fixed amount
  28. How do you perform division in modern Sass (Dart Sass)? math.div($a, $b)
  29. True/False: The SASS code is run from the command line using the "sass input.scss output.css" command. B) True
  30. Which Sass data type stores key-value pairs? Map
Turn these facts into recall: