mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-22 21:22:52 +02:00
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 https://github.com/twbs/bootstrap/commit/db45a60cc86190a060f0baf0b3961cb 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
This commit is contained in:
465
dist/css/bootstrap.css
vendored
465
dist/css/bootstrap.css
vendored
@@ -779,18 +779,18 @@ pre code {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.col-1,
|
||||
.col-2,
|
||||
.col-3,
|
||||
.col-4,
|
||||
.col-5,
|
||||
.col-6,
|
||||
.col-7,
|
||||
.col-8,
|
||||
.col-9,
|
||||
.col-10,
|
||||
.col-11,
|
||||
.col-12,
|
||||
.col-xs-1,
|
||||
.col-xs-2,
|
||||
.col-xs-3,
|
||||
.col-xs-4,
|
||||
.col-xs-5,
|
||||
.col-xs-6,
|
||||
.col-xs-7,
|
||||
.col-xs-8,
|
||||
.col-xs-9,
|
||||
.col-xs-10,
|
||||
.col-xs-11,
|
||||
.col-xs-12,
|
||||
.col-sm-1,
|
||||
.col-sm-2,
|
||||
.col-sm-3,
|
||||
@@ -803,6 +803,18 @@ pre code {
|
||||
.col-sm-10,
|
||||
.col-sm-11,
|
||||
.col-sm-12,
|
||||
.col-md-1,
|
||||
.col-md-2,
|
||||
.col-md-3,
|
||||
.col-md-4,
|
||||
.col-md-5,
|
||||
.col-md-6,
|
||||
.col-md-7,
|
||||
.col-md-8,
|
||||
.col-md-9,
|
||||
.col-md-10,
|
||||
.col-md-11,
|
||||
.col-md-12,
|
||||
.col-lg-1,
|
||||
.col-lg-2,
|
||||
.col-lg-3,
|
||||
@@ -821,72 +833,72 @@ pre code {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.col-1,
|
||||
.col-2,
|
||||
.col-3,
|
||||
.col-4,
|
||||
.col-5,
|
||||
.col-6,
|
||||
.col-7,
|
||||
.col-8,
|
||||
.col-9,
|
||||
.col-10,
|
||||
.col-11,
|
||||
.col-12 {
|
||||
.col-xs-1,
|
||||
.col-xs-2,
|
||||
.col-xs-3,
|
||||
.col-xs-4,
|
||||
.col-xs-5,
|
||||
.col-xs-6,
|
||||
.col-xs-7,
|
||||
.col-xs-8,
|
||||
.col-xs-9,
|
||||
.col-xs-10,
|
||||
.col-xs-11,
|
||||
.col-xs-12 {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.col-1 {
|
||||
.col-xs-1 {
|
||||
width: 8.333333333333332%;
|
||||
}
|
||||
|
||||
.col-2 {
|
||||
.col-xs-2 {
|
||||
width: 16.666666666666664%;
|
||||
}
|
||||
|
||||
.col-3 {
|
||||
.col-xs-3 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.col-4 {
|
||||
.col-xs-4 {
|
||||
width: 33.33333333333333%;
|
||||
}
|
||||
|
||||
.col-5 {
|
||||
.col-xs-5 {
|
||||
width: 41.66666666666667%;
|
||||
}
|
||||
|
||||
.col-6 {
|
||||
.col-xs-6 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.col-7 {
|
||||
.col-xs-7 {
|
||||
width: 58.333333333333336%;
|
||||
}
|
||||
|
||||
.col-8 {
|
||||
.col-xs-8 {
|
||||
width: 66.66666666666666%;
|
||||
}
|
||||
|
||||
.col-9 {
|
||||
.col-xs-9 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.col-10 {
|
||||
.col-xs-10 {
|
||||
width: 83.33333333333334%;
|
||||
}
|
||||
|
||||
.col-11 {
|
||||
.col-xs-11 {
|
||||
width: 91.66666666666666%;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
.col-xs-12 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 728px;
|
||||
max-width: 720px;
|
||||
}
|
||||
.col-sm-1,
|
||||
.col-sm-2,
|
||||
@@ -938,6 +950,9 @@ pre code {
|
||||
.col-sm-12 {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.col-sm-push-1 {
|
||||
left: 8.333333333333332%;
|
||||
}
|
||||
@@ -1043,6 +1058,164 @@ pre code {
|
||||
.container {
|
||||
max-width: 940px;
|
||||
}
|
||||
.col-md-1,
|
||||
.col-md-2,
|
||||
.col-md-3,
|
||||
.col-md-4,
|
||||
.col-md-5,
|
||||
.col-md-6,
|
||||
.col-md-7,
|
||||
.col-md-8,
|
||||
.col-md-9,
|
||||
.col-md-10,
|
||||
.col-md-11,
|
||||
.col-md-12 {
|
||||
float: left;
|
||||
}
|
||||
.col-md-1 {
|
||||
width: 8.333333333333332%;
|
||||
}
|
||||
.col-md-2 {
|
||||
width: 16.666666666666664%;
|
||||
}
|
||||
.col-md-3 {
|
||||
width: 25%;
|
||||
}
|
||||
.col-md-4 {
|
||||
width: 33.33333333333333%;
|
||||
}
|
||||
.col-md-5 {
|
||||
width: 41.66666666666667%;
|
||||
}
|
||||
.col-md-6 {
|
||||
width: 50%;
|
||||
}
|
||||
.col-md-7 {
|
||||
width: 58.333333333333336%;
|
||||
}
|
||||
.col-md-8 {
|
||||
width: 66.66666666666666%;
|
||||
}
|
||||
.col-md-9 {
|
||||
width: 75%;
|
||||
}
|
||||
.col-md-10 {
|
||||
width: 83.33333333333334%;
|
||||
}
|
||||
.col-md-11 {
|
||||
width: 91.66666666666666%;
|
||||
}
|
||||
.col-md-12 {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.col-md-push-1 {
|
||||
left: 8.333333333333332%;
|
||||
}
|
||||
.col-md-push-2 {
|
||||
left: 16.666666666666664%;
|
||||
}
|
||||
.col-md-push-3 {
|
||||
left: 25%;
|
||||
}
|
||||
.col-md-push-4 {
|
||||
left: 33.33333333333333%;
|
||||
}
|
||||
.col-md-push-5 {
|
||||
left: 41.66666666666667%;
|
||||
}
|
||||
.col-md-push-6 {
|
||||
left: 50%;
|
||||
}
|
||||
.col-md-push-7 {
|
||||
left: 58.333333333333336%;
|
||||
}
|
||||
.col-md-push-8 {
|
||||
left: 66.66666666666666%;
|
||||
}
|
||||
.col-md-push-9 {
|
||||
left: 75%;
|
||||
}
|
||||
.col-md-push-10 {
|
||||
left: 83.33333333333334%;
|
||||
}
|
||||
.col-md-push-11 {
|
||||
left: 91.66666666666666%;
|
||||
}
|
||||
.col-md-pull-1 {
|
||||
right: 8.333333333333332%;
|
||||
}
|
||||
.col-md-pull-2 {
|
||||
right: 16.666666666666664%;
|
||||
}
|
||||
.col-md-pull-3 {
|
||||
right: 25%;
|
||||
}
|
||||
.col-md-pull-4 {
|
||||
right: 33.33333333333333%;
|
||||
}
|
||||
.col-md-pull-5 {
|
||||
right: 41.66666666666667%;
|
||||
}
|
||||
.col-md-pull-6 {
|
||||
right: 50%;
|
||||
}
|
||||
.col-md-pull-7 {
|
||||
right: 58.333333333333336%;
|
||||
}
|
||||
.col-md-pull-8 {
|
||||
right: 66.66666666666666%;
|
||||
}
|
||||
.col-md-pull-9 {
|
||||
right: 75%;
|
||||
}
|
||||
.col-md-pull-10 {
|
||||
right: 83.33333333333334%;
|
||||
}
|
||||
.col-md-pull-11 {
|
||||
right: 91.66666666666666%;
|
||||
}
|
||||
.col-md-offset-1 {
|
||||
margin-left: 8.333333333333332%;
|
||||
}
|
||||
.col-md-offset-2 {
|
||||
margin-left: 16.666666666666664%;
|
||||
}
|
||||
.col-md-offset-3 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
.col-md-offset-4 {
|
||||
margin-left: 33.33333333333333%;
|
||||
}
|
||||
.col-md-offset-5 {
|
||||
margin-left: 41.66666666666667%;
|
||||
}
|
||||
.col-md-offset-6 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
.col-md-offset-7 {
|
||||
margin-left: 58.333333333333336%;
|
||||
}
|
||||
.col-md-offset-8 {
|
||||
margin-left: 66.66666666666666%;
|
||||
}
|
||||
.col-md-offset-9 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
.col-md-offset-10 {
|
||||
margin-left: 83.33333333333334%;
|
||||
}
|
||||
.col-md-offset-11 {
|
||||
margin-left: 91.66666666666666%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
max-width: 1140px;
|
||||
}
|
||||
.col-lg-1,
|
||||
.col-lg-2,
|
||||
.col-lg-3,
|
||||
@@ -1194,12 +1367,6 @@ pre code {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
max-width: 1170px;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
max-width: 100%;
|
||||
background-color: transparent;
|
||||
@@ -4638,20 +4805,85 @@ a.list-group-item.active > .badge,
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.visible-sm {
|
||||
.visible-xs {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
tr.visible-sm {
|
||||
tr.visible-xs {
|
||||
display: table-row !important;
|
||||
}
|
||||
|
||||
th.visible-sm,
|
||||
td.visible-sm {
|
||||
th.visible-xs,
|
||||
td.visible-xs {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
tr.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
th.visible-xs,
|
||||
td.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
tr.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
th.visible-xs,
|
||||
td.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
tr.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
th.visible-xs,
|
||||
td.visible-xs {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.visible-sm {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
tr.visible-sm {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
th.visible-sm,
|
||||
td.visible-sm {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.visible-sm {
|
||||
display: block !important;
|
||||
}
|
||||
tr.visible-sm {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.visible-sm,
|
||||
td.visible-sm {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.visible-sm {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -4664,7 +4896,7 @@ td.visible-sm {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 1200px) {
|
||||
.visible-sm {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -4691,6 +4923,19 @@ td.visible-md {
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.visible-md {
|
||||
display: none !important;
|
||||
}
|
||||
tr.visible-md {
|
||||
display: none !important;
|
||||
}
|
||||
th.visible-md,
|
||||
td.visible-md {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.visible-md {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -4703,7 +4948,7 @@ td.visible-md {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 1200px) {
|
||||
.visible-md {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -4742,7 +4987,20 @@ td.visible-lg {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.visible-lg {
|
||||
display: none !important;
|
||||
}
|
||||
tr.visible-lg {
|
||||
display: none !important;
|
||||
}
|
||||
th.visible-lg,
|
||||
td.visible-lg {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.visible-lg {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -4755,20 +5013,85 @@ td.visible-lg {
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-sm {
|
||||
.hidden-xs {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
tr.hidden-sm {
|
||||
tr.hidden-xs {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
th.hidden-sm,
|
||||
td.hidden-sm {
|
||||
th.hidden-xs,
|
||||
td.hidden-xs {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.hidden-xs {
|
||||
display: block !important;
|
||||
}
|
||||
tr.hidden-xs {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.hidden-xs,
|
||||
td.hidden-xs {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.hidden-xs {
|
||||
display: block !important;
|
||||
}
|
||||
tr.hidden-xs {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.hidden-xs,
|
||||
td.hidden-xs {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.hidden-xs {
|
||||
display: block !important;
|
||||
}
|
||||
tr.hidden-xs {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.hidden-xs,
|
||||
td.hidden-xs {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-sm {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
tr.hidden-sm {
|
||||
display: table-row !important;
|
||||
}
|
||||
|
||||
th.hidden-sm,
|
||||
td.hidden-sm {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.hidden-sm {
|
||||
display: none !important;
|
||||
}
|
||||
tr.hidden-sm {
|
||||
display: none !important;
|
||||
}
|
||||
th.hidden-sm,
|
||||
td.hidden-sm {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.hidden-sm {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -4781,7 +5104,7 @@ td.hidden-sm {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 1200px) {
|
||||
.hidden-sm {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -4808,6 +5131,19 @@ td.hidden-md {
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.hidden-md {
|
||||
display: block !important;
|
||||
}
|
||||
tr.hidden-md {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.hidden-md,
|
||||
td.hidden-md {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.hidden-md {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -4820,7 +5156,7 @@ td.hidden-md {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 1200px) {
|
||||
.hidden-md {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -4859,7 +5195,20 @@ td.hidden-lg {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.hidden-lg {
|
||||
display: block !important;
|
||||
}
|
||||
tr.hidden-lg {
|
||||
display: table-row !important;
|
||||
}
|
||||
th.hidden-lg,
|
||||
td.hidden-lg {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.hidden-lg {
|
||||
display: none !important;
|
||||
}
|
||||
|
Reference in New Issue
Block a user