By effective, I mean less code (less css rules).
Because I am converting a CSS file to a smaller one, and I was surprised to find that the compiled CSS file is quite small (I have not finished yet: P)
LESS (when compiled) and Sass also reduce your CSS. In addition to removing spaces, you will sometimes see that things like border: 0 10px 0 10px, turn into border: 0 10pxor colors like #666666, turned into #666. It is not more efficient, but it does less load for the user (which is valuable for mobile devices).
border: 0 10px 0 10px
border: 0 10px
#666666
#666
, Sass , @extend, , , .
.classA { color: blue } // 50 lines of code defining other elements... .classB { @extend .classA }
- :
.classA, .classB { color: blue }
, 2 , - , .
. .
, LESS. , (, ) @ .
@
, "" . CSS.
, , CSS . , "" CSS ( , ) - , .., .
, , , , , WinLESS ( ) .
, , LESS SASS, CSS, ( ), DOM, . , , DOM - . CSS, , , .
, , , . , , , "" , , , , . , CPU, . , , , , " - " - Knuth