3

On getbootstrap.com the features are split up under the headings CSS, Components, and JavaScript. What is the difference between CSS and Components? What exactly determines which bootstrap features fall into which of those two categories?

I've always tried to figure that out. Today I decided to search for it, but didn't find an answer.

3 Answers 3

2

CSS

Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system.

Cascading Style Sheets. You can define specific styles to an HTML element based on its tag, id, class. This section describes how to use the built-in classes that Bootstrap provides in order to quickly style elements. Rather than creating your own style sheets from scratch.

  • helper color classes for text
  • table striping
  • font choices (heading 1, heading 2, etc)
  • Changing the font and text background when writing code

Components

Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more.

Rather than modifying a current element, components use a combination of Bootstrap (and standard) tags and classes to create a feature of the webpage. <nav> alone is a single element, but mixing it with unordered lists and links creates a navbar.

  • Using an unordered list under class pagination to create page number navigation
  • Using panels to add a border and possible background to its child elements.
  • Glyphicons add a specific class to <span> elements to render the icon.

JavaScript

Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.

For completion, the Bootstrap framework has predefined jQuery functions to allow many of the components to work.

  • Highlighting the active form field
  • Animation during a dropdown menu
  • Display a tool tip when hovering over an element
Sign up to request clarification or add additional context in comments.

Comments

0

As they said on their website.

CSS:

Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system.

Components:

Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more.

JavaScript:

Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.

Bootstrap can exist without components, but can't without basic CSS styles.

3 Comments

"Fundamental HTML elements styled and enhanced..."--it seems like most components could fit that description, too. And for the Components description, "and much more" tells me this is not a very precise definition. :)
Hmm, I think that everyone can have different opinion on that and no one will be wrong.
@EricSimonton we are quoting the prelim definition provided by the bootstrap docs themselves. My answer extends those definitions a bit
0

As far as I see it features under CSS are more or less just styled basic and fundamental single HTML elements such as div, table and button..., on the other side majority features under COMPONENTS are made out of more than just a single HTML tag or are not so called basic elements. This are components that you can use out of the box and are made with different HTML tags combined to form a component.

Components are usually elements that are commonly used, which can't be built with a single HTML tag such as img or button.

2 Comments

That seems pretty close, but e.g. labels and badges don't fit that distinction.
I would separate labels and badges as not basic HTML elements, they are just custom styled elements as to buttons have fundamental functionality. I will extend my answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.