3 ms·
You could do CSS in a templating system, sure. First off, you'd want to cache it, but that's a solved problem. And you'd be well served to cook up some subtem
by gamache 16y ago
You could do CSS in a templating system, sure. First off, you'd want to cache it, but that's a solved problem. And you'd be well served to cook up some subtemplates/helpers/whatever that automated away some of the drudgery. Pretty soon you'd have more ideas on how to keep your CSS more maintainable, your subtemplates would become more general, etc.
At this point you have implemented most of Sass/Less/etc but you have a bunch of templating gunk, less documentation, and hundreds fewer eyeballs looking at the code. Or, you have not implemented most of Sass/Less/etc and you are still writing CSS like a chump.
- nostrademons 16y agoBut it would be the same templating gunk that is used by the rest of your webapp, which most likely has more documentation and thousands more eyeballs looking at the code than Sass. Most people don't roll their own templating systems. They use an established library that's been battle-tested on websites before. These libraries have been around a lot longer than Sass/Haml has.