3. Installation
Download .exe file from the following URL:
http://rubyinstaller.org/downloads/
Install and run the command prompt with
ruby
Sass -- watch style.sass:style.css
Sass – watch <sass filename>:<css
filename>
4. SASS
• SASS (Syntactically Awesome Stylesheets) is a
stylesheet language designed by Hampton Catlin and
developed by Nathan Weizenbaum.
• SASS is a scripting languages and it is interpreted to
CSS.
• SASS uses indentation to separate code blocks and
semicolons to separate rules
5. Variables
• SASS allows variables. Variables are defined with “$”
dollar sign and variable assignment is done using “:”
colon. They can be used throughtout the stylesheet.
• Variables can be arguments or results of the several
functions. During translation, the values of the variables
are inserted in the output css
7. Nesting
• It allows code to be inserted within each other
table.hl OUTPUT:
margin: 2em 0 table.hl {
td.ln margin: 2em 0; }
text-align: right table.hl td.ln {
text-align: right; }
8. Mixins
• Mixins is defined with directive “@mixin”
• Variables can be arguments or results of the several
functions. During translation, the values of the variables
are inserted in the output css
14. Advantages
• Css styles can be reused
• Common css styles can be brought
together through nesting
• It includes features like nesting, variables,
mixins which makes it more manageable
15. Disadvantages
• Need thorough learning to understand
sass
• Generated css is not aligned properly
• Difficult to understand since the syntax
has no curly braces to distinguish and very
confusing since all the styles are written
one after another.