Converts SCSS to CSS

Converts scss to css

If you click on the title CSS (SCSS) in CodePen (don't change the pre-processor with the gear) it will switch to the compiled CSS view.

Codepen Screenshot of Compiled Preview

How to Convert scss to css

Use https://sass2css.herokuapp.com/ or http://www.sassmeister.com/

Those can be used to convert scss code to CSS

How to convert SCSS to CSS automatically

Just use

sass --watch app/sass:public/stylesheets

this where:

app/sass is location of scss files and public/stylesheets location where you want to have css. It will automatically convert scss to css after each save of the sass files.

More details here: http://sass-lang.com/guide

How to convert directory SASS/SCSS to CSS via command line?

To do a one-time Sass compile instead of a watch, you can do this from the command line:

sass --update scss:css

To have Sass import one file (usually a partial, with a _ starting the filename), you can do this inside a Sass file:

@import "_base.scss";

This way, Sass knows where you want the include to occur.

By default, Sass can't import an entire directory. The Sass Globbing gem, however, can. You can install it from the command line:

gem install sass-globbing

And then watch with it:

sass -r sass-globbing --watch sass_dir:css_dir

Note that globbing will import files alphabetically, so be sure your CSS will cascade appropriately if this occurs.



Related Topics



Leave a reply



Submit