Introduction
SASS lets you write styles in a simpler way with variables and nesting. But browsers only understand CSS, so you need to turn your SASS code into CSS first.
sass input.scss output.css
sass styles.scss styles.css
sass --watch styles.scss:styles.css
@use "sass:color"; $primary-color: #3498db; body { font-family: Arial, sans-serif; background-color: $primary-color; color: color.scale($primary-color, $lightness: 50%); h1 { font-size: 2rem; margin-bottom: 1rem; } }
.scss files into .css files?style.scss into CSS using the terminal?sass input.scss output.css to compile SASS to CSS.sass style.scss style.css.sass input.scss output.css to compile [OK]style.scss:
$main-color: #3498db;
body {
background-color: $main-color;
}
What will be the compiled CSS output?$main-color holds the color value #3498db.$main-color is replaced by #3498db in the CSS output.sass --watch style.scss style.css but the CSS file does not update when you change style.scss. What is the most likely problem?--watch works--watch option monitors the SASS file for changes and recompiles automatically when saved.style.scss file after editing. -> Option A--watch recompilation [OK]styles/ folder. Which command should you use?sass --watch input/:output/ syntax.sass --watch styles/:styles --style compressed watches the styles/ folder and outputs compressed CSS to the same folder.sass --watch input:output with style flag [OK]Pass the test and this pattern moves unknown