3 ms·
Is your project small enough that variables don't benefit you? Okay, don't use CSS preprocessors.
by DGCA 11y ago
Is your project small enough that variables don't benefit you? Okay, don't use CSS preprocessors.
- yoavm 11y agoActually CSS has variables (even if the syntax is slightly messy) - https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_v...
- debaserab2 11y agoNo, it doesn't in any sort of browser compatible way.
- Retra 11y agoCSS was invented 20 years ago and it needed variables then. It still doesn't really have them.
- DGCA 11y agoI'm very excited for this to be widely supported. Right now, though, support is totally lacking in IE and Edge.
- txutxu 11y agoAgreed partially. I seems like the counterpart is: "if you need variables, then use pre-processors". Well, when I've needed variables to ease changes on CSS files, I've used a template system (previous to all current pre-processors).
- wallacoloo 11y agoSame here. My html pages already use a template system - why not use the same one for my CSS files? As a bonus, I get proper dependency tracking for my CSS files (i.e. which font files does it require at run-time, which other CSS files should trigger a rebuild when changed, etc) because my templating system is already rigged to do that. I could never figure out how to extract a dependency list from SCSS files, though I didn't search for very long.