|
|
|
|
|
by skore
4838 days ago
|
|
For me, the killer argument has always been cases like this: a.btn {
&-primary,
&-info,
&-success,
&-warning,
&-danger {
&, &:link { color: #fff; }
}
}
Where the & is replaced with the previous mark, so it would create a.btn-primary, a.btn-info. You might still argue that you could get close to the amount of characters with vanilla CSS, but as soon as you have to change small bits of this, you end up refactoring a lot of code.With LESS and SASS, you have a built-in capability to refactor things very quickly. |
|
In none of aaronbrethorst's examples were multiple terms put inside a single pair of { }. Now I can see the advantage, as (obviously) when writing CSS it is common to have a lot of repetition of the type this lets you reduce.
Now, I can see the purpose of LESS and SASS. Sometimes when explaining something to someone, the most useful feature can seem so obvious as to not need explaining.