Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.39 KB

run-book.md

File metadata and controls

46 lines (29 loc) · 1.39 KB

SASS Set-up Run-book

if node.js is installed can install SASS using NPM:

  1. npm install -g sass
  • if not, can download from GitHub

Note: Detailed instructions here https://sass-lang.com/install

  • Or try:

sudo apt install ruby-sass

  1. Check it installed correctly

sass --version

  1. Create your directories, an index.html file and a styles.scss. Note: styles.css will be created automatically on first --sass watch command but you can create it too if you'd like*
   |-- MY-PROJECT
      |-- index.html
      |-- SCSS
         |-- styles.scss
         |-- styles.css
  1. Navigate to directory with scss files

  2. Run sass command with --watch tag sass --watch input.scss output.css (change input.scss to your scss file name ie styles.scss and output.css to style.css) Note: tells Sass to watch your source files for changes, and re-compiles CSS each time you save your Sass

  3. You should now get this in your terminal:

Compiled styles.scss to styles.css. Sass is watching for changes. Press Ctrl-C to stop.

Note: a style.css.map file will be created in your SASS directory

Note: the styles.scss file is now where you will do all your edits! 😂

  1. Now, you can create your partials (ie variables file _variables.scss) and @import to your styles.scss file