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 8120045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:59:49+00:00 2026-06-06T04:59:49+00:00

According to bootstrap-responsive.css file,the media query @media (max-width: 767px) is repeated meaning it occurs

  • 0

According to bootstrap-responsive.css file,the media query @media (max-width: 767px) is repeated meaning it occurs twice in the file.Why is it repeated?.

You can see the file here http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css

  • 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-06T04:59:50+00:00Added an answer on June 6, 2026 at 4:59 am

    Hmmm, I certainly can’t claim to understand what the developers intended when they wrote the CSS, but here’s what I think…

    I believe the repetition of media queries is just to provide greater modularization of the CSS file. Note that both @media (max-width: 767px) and @media (min-width: 768px) and (max-width: 979px) are actually present twice in the file, so it’s not likely an anomaly.

    The first declarations of these media queries appear to deal with classes that are added to elements to hide/show them at certain browser widths, so in effect selectively on different devices (specifying the display property). The second declarations seem to deal with the various classes that are foundational to Twitter Bootstrap’s design principles, specifying styles (width, margin, min-height, etc.) of the various classes used in the 12-column grid system.

    Classes of the first set can be applied at the whim of the developer, to hide/show certain elements when the page is viewed on various devices. Classes of the second set are applied a bit more rigidly than the first set, since they are a more defining characteristic of the framework’s grid system (eg. You can give an element classes of both hidden-phone and visible-tablet from the first set and see the effects of both, but giving an element classes of span12 and span6 will cause only the last-given class to take effect).

    It is because the first set of classes differs significantly in application from the second set of classes that the media queries declarations are declared twice, one for each set.

    In Scalable and Modular Architecture for CSS (2012), Jonathan Snook comments on this concept of modularization, stating,

    Yes, this does mean that the media query declaration may (and likely
    will) get declared multiple times but it also allows for all
    information about a module to be kept together.

    (I apologize if I used the wrong terms when referring to styles/CSS/HTML! I’m still learning…)

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

Sidebar

Related Questions

According to Drupal 7's bootstrap file: // PHP only performs buffered reads, so in
I need to redirect according to some conditions in the bootstrap file. It is
According to the twitter bootstrap documentation , I should be able to Wrap strings
According to http://lipas.uwasa.fi/~ts/info/proctips.html#orrules , you can make basic or rules in .procmailrc with something
According to the class ElementType in the API, you can annotate local variables and
According to the W3C Recommendation for the CSS background shorthand , the values are
JQuery Mobile, Bootstrap and CSS3 Media Queries What combination to use To have an
So according to this here PyQuery is Python3 compatible, but I can't find any
According to my class notes, you can allocate an array in C++ like int
According to what I have found so far, I can use the following code:

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.