Showing posts with label scss. Show all posts
Showing posts with label scss. Show all posts

Wednesday, December 5, 2012

Using Rails.env in SASS

You can add your custom scripts to SASS easily, but make sure the following code loads in your config.rb/application.rb or somewhere along the line. and here is how you can use them

Friday, October 12, 2012

SASS support in Chrome web inspector

Google Chrome has experimental SASS support in web inspector.

To turn it on, open
chrome://flags
and
enable Enable Developer Tools experiments.

You may have to reload web inspector to make settings apply.

Then open web inspector settings (the little cog icon on the bottom right)
You see a new tab, Experiments


Select Support for SASS.

To make it work your generated CSS needs to include line numbers, which with Chrome can connect your CSS to SASS.
If you're using the command line compiler --line-numbers will do the job.

If everything works you should see SASS code when inspecting elements.

Friday, October 5, 2012

When you should use Mixins, Extend, Functions in SCSS

SCSS provides three powerful ways of code reuse, Mixins, Extend and Functions.

Use Mixins if similar sets of properties used multiple times with small variations.

Use Extend if sets of properties that match exactly.

Use Functions for commonly-used operations to determine values