|
|
|
|
|
by mddw
4838 days ago
|
|
I feel always a little lost when I read tutorials which use SASSy/LESSy CSS. Illustrating exemples with a preprocessor means lots of web developers won't be able to read you. Moreover these developers are not in the hype bandwagon (or they would be able to read SASSy/LESSy/whatever fashionable now), so they may need the most the said tutorials. |
|
So you know that Sass and Less allow you to nest rules, right? e.g.:
translates into .foo p { rules go here }Here are the examples from the article:
The ampersand simply means 'I am applied in the context of whatever rule I happen to be in'. So, .home { &:hover { } } is equivalent to writing this normal CSS: @include is like #include in C. It literally includes the referenced content in the rules you're writing. That means that is including something that (inferring from the name, here) sets the background size for the element. Given the parameters, it probably expands into: plus another rule for handling 2x images in Webkit.This is a variable. Nuff said.
make sense?