Skip to content

Commit a2b9988

Browse files
committed
Media query (grid and responsive utilities) overhaul
Grid classes have been changed to account for a fourth set of classes, meaning we now have XS, S, M, and L options. Specifically, we made the following changes: * Renames `.col-` to `.col-xs-` * Adds `.col-md-` for devices 992px wide and up * Remaps `.col-lg-` for devices 1200px wide and up Alongside that, we've updated our media queries to better handle advanced grid layouts: * All column classes now kick in when they hit a `min-width`, undoing the #9128 fix in db45a60 c690f3a65 * All column offsets, pushes, and pulls are scoped to an appropriate range, meaning a `min-width` and `max-width` (thanks for the idea, @eratzlaff) We've also modified the widths of our grid containers for the small device grid (now a max 720px instead of 728px) and large device grid (now a max 1140px instead of 1170px) to avoid horizontal scrollbar problems in Firefox (likely due to box-sizing, which is why we didn't see it in 2.x). Similarly, we've updated the responsive ultility classes to match the new four media query approach of the grid system. That means we've: * Added new `.visible-xs` and `.hidden-xs` classes * Reassigns visible and hidden classes for small, medium, and large to matching grid system media queries * Updates docs examples to match grid system and account for fourth utility range ----- Fixes the following: * #9135: fourth grid tier * #9302: undoes previous range change for small grid system, so no need to update any docs here * #8755: consistent grid and responsive utilities schemas) * #9195, #9216, and #9227: no more horizontal scrollbars
1 parent 95affa3 commit a2b9988

File tree

8 files changed

+776
-246
lines changed

8 files changed

+776
-246
lines changed

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>{{ page.title }}</h1>
2525

2626
<div class="container bs-docs-container">
2727
<div class="row">
28-
<div class="col-lg-3">
28+
<div class="col-md-3">
2929
<aside class="bs-sidebar" role="complementary">
3030
<ul class="nav bs-sidenav">
3131
{% if page.slug == "getting-started" %}
@@ -42,7 +42,7 @@ <h1>{{ page.title }}</h1>
4242
</ul>
4343
</aside>
4444
</div>
45-
<main class="col-lg-9" role="main">
45+
<main class="col-md-9" role="main">
4646
{{ content }}
4747
</main>
4848
</div>

assets/css/docs.css

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -637,17 +637,9 @@ body {
637637
------------------------- */
638638
.responsive-utilities-test {
639639
margin-top: 5px;
640-
padding-left: 0;
641-
list-style: none;
642-
overflow: hidden; /* clear floats */
643-
}
644-
.responsive-utilities-test li {
645-
position: relative;
646-
float: left;
647-
width: 25%;
648640
}
649-
.responsive-utilities-test li + li {
650-
margin-left: 10px;
641+
.responsive-utilities-test .col-xs-6 {
642+
margin-bottom: 10px;
651643
}
652644
.responsive-utilities-test span {
653645
padding: 15px 10px;

0 commit comments

Comments
 (0)