Live data from Hacker News

CSS 'frameworks' are missing the point (2008)

stackoverflow.com

31–40 of 44 posts

Re: CSS 'frameworks' are missing the point (2008)

#31
post #27

Earlier quoted context omitted.

You can compile Bootstrap yourself from LESS or SASS, pushing your own values into the Bootstrap variables (and ideally sharing this configuration with your custom styles). In the process you can choose not to include some Bootstrap components, reducing it's weight significantly. It's NOT a lightweight framework.

I know I can do this, but I don't because I prefer to just download the boostrap latest vanilla, and override as needed. That way every time there is a new version I don't have to do mental gymnastics on what variables are new or renamed.

I get your point, but at the same time your argument is an odd one to make.

At least the SASS-port of Bootstrap declares it's variables as defaults - meaning they would not be set if they were set earlier (in your configuration). This makes upgrading the gem (or plain source files) rather simple. But sure, you might have to check if anything was renamed or added.

But with overriding you do not only create redundant, unnecessary styles (and bytes), but if you now upgrade your bootstrap files as you suggest, you also have to change your overrides - which depending on the amount of changes you did will be significantly more work (and 'mental gymnastics') - if changes were introduced.

So you gain very little (less setup effort) but lose quite a lot.

Re: CSS 'frameworks' are missing the point (2008)

#32

Even with less or sass, a basic, modern grid will have at least three levels of DOM-level logic that determines presentation, so you have things like this: that you could perhaps use mixins to replace some of the elements with (you could mix-in "row" to "nav-header", and "col-sm-2" to "my-logo"), but regardless, you still need three DOM nodes, and trying to fit those into a purely semantic separate-structure-from-pre…

You should check out Bourbon Neat: http://neat.bourbon.io/ , or leverage Sass' @extend directive. Your CSS could easily be shortened to: .body { @extend .container; } .nav-header { @extend .row; } .my-logo { @extend .col-sm-2; } And your markup could be much cleaner:

Very much this. By wrapping your mind around the new possibilities the whole 'seperate style from content' becomes much more trivial (and so much more maintainable) that the discussion mostly ends at this point.

Re: CSS 'frameworks' are missing the point (2008)

#33
post #27

Earlier quoted context omitted.

You can compile Bootstrap yourself from LESS or SASS, pushing your own values into the Bootstrap variables (and ideally sharing this configuration with your custom styles). In the process you can choose not to include some Bootstrap components, reducing it's weight significantly. It's NOT a lightweight framework.

I know I can do this, but I don't because I prefer to just download the boostrap latest vanilla, and override as needed. That way every time there is a new version I don't have to do mental gymnastics on what variables are new or renamed.

I maintain a fork, sometimes a PITA but never a surprise!

Re: CSS 'frameworks' are missing the point (2008)

#34

I don't know about you "leet hacker pros" but I do know that using bootstrap 3 helped me make my site[1] completely responsive - with ease the like of which the world has never seen the like of which[2]. If you are using bootstrap for it's color choices you're doing it wrong. What I do is have bootstrap.css vanilla loaded, then I load a bootstrap_overrides.css.scss where I override styles/colors/looknfeel. Make boots…

You can download bootstrap, modify their variables and compile it yourself. That way you don't have load more than one files and have rules that will never get used.

I wish they made this more prominent vs pointing most people to the "download" button which throws everything in there

You can even customize it on their server if you aren't comfortable doing it yourself: http://getbootstrap.com/customize/

Re: CSS 'frameworks' are missing the point (2008)

#36

Useless, not so much. The best solution all the time? Also not so much. I agree with the points about it being just a large set of declarations, there aren't a lot of good ways to lazy load CSS (that I know of) so in some cases you're pushing a lot of bytes that you don't need to and creating dead weight. Also the presentation in markup point is one I have been saying for years. We hear about the death of tables and…

For sure. Bootstrap is good for... bootstrapping. After you've got your MVP working and you're ready to make a real, custom, unique, differentiated, improved user experience, you're going to need to hire a designer and someone who can write CSS. Bootstrap isn't going to make the interface for your Great New Thing (TM) and if your great new thing can be built with Bootstrap... idk, maybe it's not so great?

Re: CSS 'frameworks' are missing the point (2008)

#37

Even with less or sass, a basic, modern grid will have at least three levels of DOM-level logic that determines presentation, so you have things like this: that you could perhaps use mixins to replace some of the elements with (you could mix-in "row" to "nav-header", and "col-sm-2" to "my-logo"), but regardless, you still need three DOM nodes, and trying to fit those into a purely semantic separate-structure-from-pre…

No, you don't need all this, there are tools to help. Look at Susy for example. God knows how many times I deleted '' out of markup templates.

Re: CSS 'frameworks' are missing the point (2008)

#39
post #11
post #4

Completely invalid advice in 2014. LESS and SASS now provide everything that CSS "can't do" in this answer.

The answer is still valid. LESS and SASS are CSS preprocessors, not frameworks. Sending spaghetti code to the user's browser can be limited but LESS and SASS do not address the flaw of CSS frameworks.

'div class="span-24"' is no better than a table

Even within the strict scope of CSS this post shows it's age. The phrase above in particular reaks of being written in a time before philosophies such as OOCSS. Additionally, popular frameworks are no longer tied as tightly to fixed-pixel values.

If somebody were vehemently arguing these sorts of points today, I would be concerned that I was dealing with the type of developer who resists change or is opposed to exploring and understanding the approaches of others.

Re: CSS 'frameworks' are missing the point (2008)

#40

I don't know about you "leet hacker pros" but I do know that using bootstrap 3 helped me make my site[1] completely responsive - with ease the like of which the world has never seen the like of which[2]. If you are using bootstrap for it's color choices you're doing it wrong. What I do is have bootstrap.css vanilla loaded, then I load a bootstrap_overrides.css.scss where I override styles/colors/looknfeel. Make boots…

> If you are using bootstrap for it's color choices you're doing it wrong.

I don't agree. I've launched several semi-successful sites where I've used Bootstrap solely because of the looks. Why exactly is that wrong?

Post reply on HN