Live data from Hacker News

OOCSS + Sass = The best way to CSS

ianstormtaylor.com

51–57 of 57 posts

Re: OOCSS + Sass = The best way to CSS

#52
I absolutely love Sass. And I still don't understand why the W3C has not adopted many of those suggestions in the actual css spec. But then again, when was the last time the W3C did anything that mattered? It always was the open source community and the browser vendors pushing things forward.

Re: OOCSS + Sass = The best way to CSS

#53
post #3

tl;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.

Stylus+Nib is the way to go. It annoys me to no end how overlooked it is.

Re: OOCSS + Sass = The best way to CSS

#54
post #53

Earlier 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.

OP here. I actually used to use Stylus and Nib, so don't worry I didn't overlook it. Actually I'm the #5 on the Nib contributors list :p https://github.com/visionmedia/nib/graphs/contributors

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

#56
post #42

Is 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.

Yup you're right. And nope, it's not possible it LESS. Mixins actually aren't the same thing, they are just a way to duplicate code, which is exactly what you're trying to avoid. I'd seriously recommend you try Sass. It's got much more going for it.

Re: OOCSS + Sass = The best way to CSS

#57
post #35
post #31

In 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.

Sorry for the delayed reply. Yes, I would very much like to see that. I'd love to try it out, and would happily give feedback on using it in a couple of personal projects. My email's in my profile.
Post reply on HN