OOCSS + Sass = The best way to CSS
51–57 of 57 posts
Re: OOCSS + Sass = The best way to CSS
#52Re: OOCSS + Sass = The best way to CSS
#53tl;dr Somebody discovered the power of mixins I don't see how SASS is doing something unique here that other preprocessors can't do as well.
Yup. Stylus ( https://github.com/LearnBoost/stylus ) has mixins and a lot more.
Re: OOCSS + Sass = The best way to CSS
#54Earlier quoted context omitted.
Yup. Stylus ( https://github.com/LearnBoost/stylus ) has mixins and a lot more.
Stylus+Nib is the way to go. It annoys me to no end how overlooked it is.
But it also used to annoy me how much it was overlooked. Not for Sass so much, but LESS is horrible compared to either Sass or Stylus.
That being said, Stylus doesn't have the ability to extend selectors that don't appear in markup, the way @extend'ing %placeholders works in Sass. (Not that I blame TJ, the guy's awesome repo ratio is the best on github!)
The thing that gets me frustrated with both Stylus and Jade is that they go a bit too far in the minimal syntax direction at the cost of other syntax improvements (since going minimal means its harder to differentiate pieces). The Sass syntax is more than simple enough, and the option to drop semi-colons is a cool thought experiment, but not so useful in real scenarios.
And then there's momentum too. I mostly just wish that we could all get behind one pre-processor, and Sass is the one with the best momentum. (I say best, because LESS has some momentum, but it's syntax is way less thought through, and it has less active committers.) I don't blame TJ at all for this, but he definitely has less time to devote to Stylus than the multiple Sass contributors do. Mostly it's just a question of putting your chips with the player with the most momentum because that will bring you the fastest updates.
Re: OOCSS + Sass = The best way to CSS
#55Re: OOCSS + Sass = The best way to CSS
#56Is this possible in LESS? I know LESS mixins "is kind of the same thing", but the way i understand the %placholder is that it doesn't paste code into the class where you call it. It actually builds a dynamic class containing the code and then add the selectors/classes/ids (thats using the placeholder) to that class. Right? Right.
Re: OOCSS + Sass = The best way to CSS
#57In an ideal world, I'd like to be able to use the CSS framework of my choice e.g. bootstrap, semantic markup for the reasons the author described in the article, and, the ability to extend my semantic classes with the .span2, .container, etc. classes from the framework. I actually thought about doing it this way by just importing the bootstrap CSS and extending from the various parts, but I realised elements inside t…
I thought this exact same thing a few months and have been building a framework that works exactly this way. I've spoken about it at a number of small meetups and events. I haven't released it to the public yet, and it's currently getting a rewrite and bump to v2, but if you'd like to check it out i can send it over.