4 ms·
I half agree with you, but one of the real benefits that SASS gives you here is making dependencies more obvious. A named variable like `$slider-height` is much
by alnorth 10y ago
I half agree with you, but one of the real benefits that SASS gives you here is making dependencies more obvious. A named variable like `$slider-height` is much clearer than a random number like `50px`. Yeah, you could put a comment next to every constant in the CSS, but I don't think that's clearer than the SASS alternative.
- crashdown 10y agoI think you've hit the nail on the head here.
- mrec 10y agoI'd hope CSS variables [1] will make that argument obsolete soon, but then again I've been hoping that for a while... [1] https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_v...
- dwaltrip 10y agoSCSS variables also make things FAR more maintainable. To change a color, you shouldn't have to change every single line where that color is used. You update the value where your color variable is defined, and then each style declaration that uses the color variable receives the new value automatically.