Re:Ask HN: Why is everything in JavaScript changing so fast?
by Roboprog on Friday October 21, 2016 @11:54AM
(#12761447)
I have found a nice compromise, in Angular apps at least, is to make a directive (tag library) that generates my "<style>" block.
It's reasonably "thin", but I can use variables to hold repeated style elements that get mixed in various selectors.
Re:Ask HN: Why is everything in JavaScript changing so fast?
by civilian on Friday October 21, 2016 @09:01AM
(#12760018)
They were rhetorical questions anyway :) But you're right, I get away without preprocessors when I'm doing very small projects. And a year ago my team had a 20-second SASS compilation step, that was painful. I guess I couldn't do without it because of things like: variables, nested rules, vendor prefixes, and mixins. I use a lot of mixins in scss and I feel like my code becomes more modular because of it.
Re:Ask HN: Why is everything in JavaScript changing so fast?
by onli on Friday October 21, 2016 @09:32AM
(#12760232)
> I use a lot of mixins in scss and I feel like my code becomes more modular because of it.
Well, it does, if you don't emulate the same effect with other means. But imho, needing modularity in CSS means (for most projects that are not gigantesque) that the CSS is too big anyway. It depends on what one does, specific web apps might need it. But normal web pages never.
Not him, but yes, I absolutely do. Pre-processors mainly have the effect of forcing you to have a build tool workflow, and the nice thing about web design is that you don't need stuff like that.