Monday, February 26, 2024

SASS

 SASS Exists in two forms: SASS File and SASS 


Need a preprocessor

, LibSass is unusable on its own and must be wrapped by another library to provide an interface for compiling Sass stylesheets to CSS. The most popular wrapper for LibSass has to be node-sass6, a Node.js library that compiles Sass to CSS through LibSass


 npm install node-sass -g


node-sass --watch input.scss output.css

 // Variable assignment $my-variable: 42px; 

 // Variable usage .foo { width: $my-variable; }


save the above file as .scss


it will be converted to css

No comments:

Post a Comment