Hacker News new | ask | show | jobs
by scarecrowbob 3714 days ago
Well, typically it's more like:

.home { .twitter-area { @include grid-column(4); } }

But personally I find that to be much more of a pain in the butt to come back to a couple of months later than just applying the column classes directly to elements.

2 comments

And then in case you want to change element size you will have to go through all the elements that were generated in the backend where you applied inline style and change that manually for each of them? You either have never worked with big CSS projects or I am just not understanding what you mean, applying inline styles directly to elements will cause a maintenance havoc in my opinion
Hey, that's totally your opinion, and when you pay me, that's what I'll do.

I don't recall saying anything about inline css though. To be specific, I'm saying that I prefer to have the column classes directly applied to the elements as opposed to using sass to include the column css to the semantic CSS classes of the elements.

I dunno what that has to do with applying a style attribute directly inline to an element.

I'll tell you what doe bug me, when I change the number of columns on my project, becasue that is coded directly into the elements, but honestly I've never had to do that very far into any project.

Same here.

But it somehow hurts to look at the markup later, with all the classes, etc.

Yeah, that can be annoying to look at 5 or 6 classes-- it's certainly not semantic and it can be quite a pile. I use foundation and I feel like the class names are more aesthetically pleasing, but that's a really minor concern :D

But practically I find that it's less difficult to make layout changes this way-- I can just cut sections and paste them somewhere else and I don't have to look elsewhere for their actual layout rules. I find it much more difficult to untangle the grid system when I can look at the classes directly on the elements.

I say this having had to do it even for my own code quite a bit... I just find it a little more difficult to think out when I don't have the columns listed on the elements themselves.