Hacker News new | ask | show | jobs
by lcnmrn 4373 days ago
Why do you need Bootstrap?

You can write a grid system in less than 10 lines of code with Sass. You can also do a typographic mixin in 5 lines of code then customise it as you need. You can also have a icon web font set only for <i> tag in 5 lines of code. What else is there? Forms. You can reset the forms in another 5 lines of code then add stuff for [type=submit] and so on.

Why do you need thousands of lines of code when you can have a pretty nice CSS framework in less than 50 lines of code? This costs you time, money and your site will take more time to render by slow browsers.

10 comments

So consider all the lines of code in Bootstrap that aren't in your hypothetical framework. They either do something or they don't. Let's assume the former because the latter implies incompetence and there's too many eyeballs on Bootstrap for that to be plausible.

So your question can be reformulated as "Bootstrap contains functionality that I don't think is needed".

If you agree that's a reasonable restatement then you can start a much more fruitful discussion if you could give a few examples and your reasoning behind why each one isn't needed.

What are you claiming the extra "thousands - 20" lines of code are for? I'm curious to know whether I need them or not.

Package all that up so people can just drop it in and have a nice looking site. Then people will use your system instead of Bootstrap.
IIRC that's where HTML5 Boilerplate started (H5BP), that developed and was used as the basis for Bootstrap.

H5BP is still available and there's a neat little packager, http://www.initializr.com/, that lets you include the parts you want and preconfigure it.

One reason to use a template system (with version control/plugins so you can modify locally and still merge in upstream changes and such) is that you can spend an awful lot of time keeping track of browser changes, standards changes, security issues, accessibility best practice, wide cross-browser testing and all the other niceties that go in to even a default template.

All this bootstrap hate is mind numbing. The simple fact is, that I was able to build a site in ONE NIGHT after work using bootstrap as the basis for my design. Using anything less featured (and less familiar to me) than Bootstrap would have added enormous amounts of time before I could release. The site in question was able to get some traction because of its timely release and I am iterating on that now and growing.

The idea that using Bootstrap cost me time is objectively wrong, as is that of it costing me money. Currently, my minified CSS and javascript from bootstrap is not affecting the page load time in any significant way. For me, using Bootstrap for MVPs has proved supremely useful, time and time again. I would not be as bold as you and claim my experience is applicable to everyone, but it is obviously very beneficial for me.

Something not often considered by the haters is that most of the time, the customers that the MVP is directed at have no clue about Bootstrap. Unless I'm building something for developers, it's usually not something they have seen before. I've actually gotten many compliments on design, when it was largely just Bootstrap's CSS.

Further, putting some structure in for SASS typography isn't the same as creating good typography. I've found it extremely difficult to create readable, custom typography in the past and I'm quite sure I am not alone.

Your "framework" gives me some kind of grid system, some structure that I can go out and create my own typography system inside of and some kind of functionality to "reset" forms. And then I can add "stuff for [type=submit]". GREAT.

Things I used from Bootstrap 3 in my MVP created in one night:

1. Responsive grid system. 2. Typography 3. Colors 4. Notifications 5. Forms 6. Buttons 7. Modals 8. Panels 9. Wells 10. Image helper classes 11. Navigation Bar 12. Pagination 13. Popovers 14. Media Objects

Your idea for replacing Bootstrap falls so short of the mark it is laughable.

Because it has been tested on a wide range of browsers and devices and your custom CSS might not.It's exactly the same as"you might not need jQuery stuff".Yeah you might not need that but again,how many of us test our code on 50+ devices ,browsers and browser versions? So yeah you might need any tool that has a comprehensive test suite.
Because it saves time and has been extensively tested across all browsers? And there's vastly more utility to Bootstrap than just a grid, forms and icons.

It's also not an all or nothing proposition, you can simply include the bits and pieces you want to keep the size down.

e.g., @import '../../bower_components/bootstrap/less/grid';

Would you bother showing those <50 lines of code?
Pay me 50$.
I'll pay you $50 to post it on here and embarrass yourself. Do you accept bitcoin?
No bitcoin, no money. You can see the CSS code on my sites. Change .css to .sass for the source. You should have take it as a challenge: a minimal CSS module that can be used from web apps to presentations sites. That's my idea. 50 lines of code is a good start. It should be a bit more than a CSS reset, it will have a basic grid system, one basic form style, etc.

I don't want to learn Bootstrap or any another framework, I know that there are other designers who think like me. Designers like to make their own custom stuff. That's the reason you see millions of WordPress themes out there. Everyone is different and want to see and use something different.

Doing everything with Bootstrap is not efficient. Most of the people here don't have a designer mindset, yet they flag anything that is against their way of thinking.

This particular framework took me less than a day to learn. I am proficient in CSS, but it doesn't matter so much. It is delivered by a CDN and then cached.

So, my code looks like this: div.container div.row.row-fluid div.col-sm-6 [left side content] div.col-sm-6 [right side content]

That means I can write something like: .container>.row.row-fluid>.col-sm-6{left content}+.col-sm-6{right content}

as an emmet.io string and be done with layout.

You are welcome to style things anyway you want, but this works well. Moreover, Bootstrap features a module chooser so you can choose to not include the entire framework if that is your choice. And it supports Sass so you can accomplish what you are doing manually today in a framework-supported way.

What is important is that once I am done building my application, I can contract with any number of designers who like to build on top of Bootstrap and change its look and feel instantly. I specifically look for evidence of proficiency styling Bootstrap 3.

This to me means it is efficient.

That means designers like you who advertise "I can make your Bootstrap site look unique" can make even more money.

There is a very healthy marketplace of WordPress premium themes. Businesses build a default site, fill it with content, and apply a theme or contract with someone to build them a theme. Bootstrap is bringing the same concept to web applications.

This is the reality of design in 2014 and it would be in your interests to join the trend.

I thought your idea was supposed to SAVE us money!!?
I agree with the people who disagreed with you below, so I'll try not to reiterate the points they mentioned. For example, the most important feature (to me) of bootstrap is its wide usage/testing/community across many devices. but another salient issue is that I have other things to worry about such as content. I dont want to be fussing around with these 50 lines of code (they are very important but not the bigger picture) when there there is a tried and true framework already available.
You just stepped on a lot of toes.

The most popular project on Github is : https://github.com/search?q=stars%3a%3E1&s=stars&type=Reposi...

Clearly there has to be something worth more than 50 lines of CSS.

In case anyone wonders about this, https://gist.github.com/richbradshaw/8949c61fb4ba7b7ed3ba is the basic grid back from Bootstrap 2 (the .container, .row, .spanN one).
Bootstrap isn't a prototyping framework — it's made for production. This fact subsumes the points about (1) testing across browsers, (2) being community-driven (and thus scientific), (3) aesthetic standards, and (4) implementation standards.

Sure you can make your own hammer, and you can even use a non-hammer you find sitting right next to you. But you'll quickly find out that some non-hammer won't accomplish everything you think a hammer ought to accomplish. Bootstrap isn't just an invention/innovation — it is a framework.

Your question honestly is no different from "Why do we need frameworks?" And we just need to stop wasting out time asking these bloated philosophical questions that get us nowhere.

"Why do we need dictionaries?" Well, because if everyone went about their own way, they'd all re-invent the wheel a thousand times over, but we'd never see any cars.