* * Less Similar to Sass but uses Javascript. Easier to install, slower to compile. * * * Stylus Less popular than the others. Follows the CSS syntax less strictly.
More documentation + a bigger community = Better support Quicker compiling, especially with the use of Compiler tools. Regular CSS is valid Scss (the newest Sass syntax)
More documentation + a bigger community = Better support Quicker compiling, especially with the use of Compiler tools. Regular CSS is valid Scss (the newest Sass syntax) h1 color: #666 h1 { color: #666; } style.sass style.scss
nav a { background: #040506; @extend .button; } input - scss output - css .button, nav a { font-size: 1em; color: #010203; border: 1px solid; } nav a { background: #040506; } @extend adds the current selector to the original one
$color; -moz-box-shadow: $top $left $blur $color; box-shadow: $top $left $blur $color; } Arguments become placeholders where a value will be specified Mixin name Arguments
$point == palm { @media (max-width: $viewport_palm - 1px) { @content; } } @else if $point == lap { @media (min-width: $viewport_palm) { @content; } } @else if $point == portable { @media (min-width: $viewport_lap) { @content; } } @else if $point == desk { @media (min-width: $viewport_desk) { @content; } } // additional breakpoints? Just state the argument @else { @media ($point) { @content; } } } Variables, so we can easily adjust our breakpoints A short name for our mixin (we’ll be using in lots) Name our four breakpoints (whatever we like)
$point == palm { @media (max-width: $viewport_palm - 1px) { @content; } } @else if $point == lap { @media (min-width: $viewport_palm) { @content; } } @else if $point == portable { @media (min-width: $viewport_lap) { @content; } } @else if $point == desk { @media (min-width: $viewport_desk) { @content; } } // additional breakpoints? Just state the argument @else { @media ($point) { @content; } } } Variables, so we can easily adjust our breakpoints A short name for our mixin (we’ll be using it a lot) Name our four breakpoints (whatever we like) Here we state the rule for each breakpoint.