Home  >  Article  >  Web Front-end  >  5 reasons not to use Twitter Bootstrap_html/css_WEB-ITnose

5 reasons not to use Twitter Bootstrap_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:05:161112browse

In our previous blog post, we discussed the benefits of using Twitter Bootstrap in web design and development projects. Twitter Bootstrap also has many shortcomings. Let’s look at these major issues:

1. It doesn’t follow best practices

We encountered while using Twitter Bootstrap One of the biggest problems is that your DOM elements will be crowded with a large number of classes. This breaks one of the basic rules of good web design, HTML no longer has semantics, and content and presentation are no longer separated. Front-end purists will find this rather annoying, arguing that it makes scalability, reusability, and maintenance more of a challenge. Presentation and interaction are no longer independent of content and are further enhanced in Twitter Bootstrap.

Oh, so many unnecessary classes!

2. It will collide with my existing setup

If you are airdropped into a big half-done project and want to use Twitter Bootstrappy to enjoy it What happens to all the benefits? Worse, you'll run into a host of problems, starting with generating HTML, CSS, and JavaScript. Then there are their resources, and you have to dig into those dark corners of the project and figure out which scripts and styles need to be removed or replaced. Twitter Bootstrap will potentially create extra work, and as you get deeper into the project you will inevitably find and fix the odd bug, and the reasons you justify yourself will defeat the purpose of using it in the first place.

3. Twitter Bootstrap is too heavy

Frankly speaking, Twitter Bootstrap includes 126kb of CSS and 29kb of JavaScript. If you want to use all the features of Twitter Bootstap, you should carefully consider the load time of resources. Of course, for some places this might not be a problem, but in New Zealand the internet has to go across the Pacific and the data will be slow to get there. So consider your target market. Twitter Bootstrap will help you build an attractive, responsive website, but some mobile users will be turned off by slow loading times and battery-hogging scripts.

4. No support for SASS

Probably one of the biggest arguments is that BootStrap is built with Less and does not natively support Compass and SASS. Now don't get me wrong, Less is good, I've used it before and it definitely has its merits. But SASS is better, with a framework similar to Compass, and using it doesn't seem to require too much thought at all. Some people have built the Compass gem for Bootstrap, but frankly, you're going to have to use Less. In future articles, I will discuss SASS and Less more. Meanwhile, Chris Coyier has written an article comparing the two.

5. "Hey! My new site looks just like everyone else's!"

Twitter Bootstrap is so popular that every developer and his dog uses it. You may find that due to time constraints, you are forced to use many native Bootrasp styles when customizing your app or website. This can lead to the unintentional creation of many similar, generic and unappealing websites. While Twitter Bootstrap is fast and easy to implement, creativity is often the result of compromise. In the limited time, in the structured environment of Bootstrap, it is difficult to achieve innovative designs that break the rules.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn