Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7921525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:36:40+00:00 2026-06-03T16:36:40+00:00

To make a primary button using Twitter’s Bootstrap library , you need to use

  • 0

To make a primary button using Twitter’s Bootstrap library, you need to use two CSS classes like so: class="btn btn-primary".

Why did they design the API this way, when they could have made btn-primary include all of the CSS that btn includes? Is it purely to save on code duplication and therefore file size or is there a more complex reason?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:36:42+00:00Added an answer on June 3, 2026 at 4:36 pm

    This is because of OOCSS principles. Detaching certain styles from elements allows for better code and style reuse and a easier way to rapidly modify any object in your css. For example, you have your main .btn class that styles your button with the default grey color, so all buttons with the .btn class will have the same style, but with predefined styles you can extend that same button class to support multiple different color schemes without the need to write the default .btn properties over and over again, so its easier to maintain. If you look at the css for the .btn-warning and all other button state classes you can see that they just define the color and style of the button and skip the need to rewrite the button class once again;

    .btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
        background-color: #F89406;
    }
    

    This allows for easier to read and shorter,more cleaner stylesheets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Twitter Bootstrap, and trying to make my links ASP.Net MVC look nice.
Can I make a primary key like 'c0001, c0002' and for supplier 's0001, s0002'
Hi I want to know if it is possible to make two primary keys
I'm trying to make someones number a primary number in the specific contact numbers.
I have a table with primary key (ColumnA, ColumnB). I want to make a
Make it on Linux. The reason to use more than one version of Vim,
I make a call just like this: value = ./simulated_annealing Which is a C
I have the following HTML: <tr> <td class=ui-widget-content> <a title=Edit href=/Administration/Menus/Edit/001W class=editLink ui-button ui-widget
I'm using jquery UI 1.8 - I apply the button functionality to my html
I am using Devise in my web application and was wondering how to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.