mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
More consistent naming with screen size variables using xs, sm, md, and lg
This commit is contained in:
+2
-2
@@ -272,9 +272,9 @@
|
||||
// Note that `.col-lg-12` doesn't get floated on purpose—there's no need since
|
||||
// it's full-width.
|
||||
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg-desktop) {
|
||||
.container {
|
||||
max-width: @container-large-desktop;
|
||||
max-width: @container-lg-desktop;
|
||||
}
|
||||
|
||||
.col-lg-1,
|
||||
|
||||
+12
-12
@@ -558,7 +558,7 @@
|
||||
padding-right: (@gutter / 2);
|
||||
|
||||
// Calculate width based on number of columns available
|
||||
@media (min-width: @screen-small) {
|
||||
@media (min-width: @screen-sm) {
|
||||
float: left;
|
||||
width: percentage((@columns / @grid-columns));
|
||||
}
|
||||
@@ -566,17 +566,17 @@
|
||||
|
||||
// Generate the small column offsets
|
||||
.make-sm-column-offset(@columns) {
|
||||
@media (min-width: @screen-small) {
|
||||
@media (min-width: @screen-sm) {
|
||||
margin-left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-sm-column-push(@columns) {
|
||||
@media (min-width: @screen-small) {
|
||||
@media (min-width: @screen-sm) {
|
||||
left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-sm-column-pull(@columns) {
|
||||
@media (min-width: @screen-small) {
|
||||
@media (min-width: @screen-sm) {
|
||||
right: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
@@ -591,7 +591,7 @@
|
||||
padding-right: (@gutter / 2);
|
||||
|
||||
// Calculate width based on number of columns available
|
||||
@media (min-width: @screen-medium) {
|
||||
@media (min-width: @screen-md) {
|
||||
float: left;
|
||||
width: percentage((@columns / @grid-columns));
|
||||
}
|
||||
@@ -599,17 +599,17 @@
|
||||
|
||||
// Generate the large column offsets
|
||||
.make-md-column-offset(@columns) {
|
||||
@media (min-width: @screen-medium) {
|
||||
@media (min-width: @screen-md) {
|
||||
margin-left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-md-column-push(@columns) {
|
||||
@media (min-width: @screen-medium) {
|
||||
@media (min-width: @screen-md) {
|
||||
left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-md-column-pull(@columns) {
|
||||
@media (min-width: @screen-medium) {
|
||||
@media (min-width: @screen-md) {
|
||||
right: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
@@ -624,7 +624,7 @@
|
||||
padding-right: (@gutter / 2);
|
||||
|
||||
// Calculate width based on number of columns available
|
||||
@media (min-width: @screen-large) {
|
||||
@media (min-width: @screen-lg) {
|
||||
float: left;
|
||||
width: percentage((@columns / @grid-columns));
|
||||
}
|
||||
@@ -632,17 +632,17 @@
|
||||
|
||||
// Generate the large column offsets
|
||||
.make-lg-column-offset(@columns) {
|
||||
@media (min-width: @screen-large) {
|
||||
@media (min-width: @screen-lg) {
|
||||
margin-left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-lg-column-push(@columns) {
|
||||
@media (min-width: @screen-large) {
|
||||
@media (min-width: @screen-lg) {
|
||||
left: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
.make-lg-column-pull(@columns) {
|
||||
@media (min-width: @screen-large) {
|
||||
@media (min-width: @screen-lg) {
|
||||
right: percentage((@columns / @grid-columns));
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -216,7 +216,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-phone-max) {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
// Dropdowns get custom display when collapsed
|
||||
.open .dropdown-menu {
|
||||
position: static;
|
||||
@@ -311,7 +311,7 @@
|
||||
.form-inline();
|
||||
|
||||
.form-group {
|
||||
@media (max-width: @screen-phone-max) {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
@@ -512,7 +512,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-phone-max) {
|
||||
@media (max-width: @screen-xs-max) {
|
||||
// Dropdowns get custom display
|
||||
.open .dropdown-menu {
|
||||
> .dropdown-header {
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: @screen-small) {
|
||||
@media (min-width: @screen-sm) {
|
||||
> li {
|
||||
display: table-cell;
|
||||
width: 1%;
|
||||
|
||||
@@ -37,98 +37,98 @@
|
||||
|
||||
.visible-xs {
|
||||
.responsive-visibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
}
|
||||
.visible-sm {
|
||||
.responsive-invisibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
}
|
||||
.visible-md {
|
||||
.responsive-invisibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
}
|
||||
.visible-lg {
|
||||
.responsive-invisibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-xs {
|
||||
.responsive-invisibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
}
|
||||
.hidden-sm {
|
||||
.responsive-visibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
}
|
||||
.hidden-md {
|
||||
.responsive-visibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
}
|
||||
.hidden-lg {
|
||||
.responsive-visibility();
|
||||
@media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
|
||||
@media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
|
||||
@media (min-width: @screen-md) and (max-width: @screen-md-max) {
|
||||
.responsive-visibility();
|
||||
}
|
||||
@media (min-width: @screen-large-desktop) {
|
||||
@media (min-width: @screen-lg) {
|
||||
.responsive-invisibility();
|
||||
}
|
||||
}
|
||||
|
||||
+14
-15
@@ -193,26 +193,25 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
// Extra small screen / phone
|
||||
@screen-xsmall: 480px;
|
||||
@screen-phone: @screen-xsmall;
|
||||
@screen-xs: 480px;
|
||||
@screen-phone: @screen-xs;
|
||||
|
||||
// Small screen / tablet
|
||||
@screen-small: 768px;
|
||||
@screen-tablet: @screen-small;
|
||||
@screen-sm: 768px;
|
||||
@screen-tablet: @screen-sm;
|
||||
|
||||
// Medium screen / desktop
|
||||
@screen-medium: 992px;
|
||||
@screen-desktop: @screen-medium;
|
||||
@screen-md: 992px;
|
||||
@screen-desktop: @screen-md;
|
||||
|
||||
// Large screen / wide desktop
|
||||
@screen-large: 1200px;
|
||||
@screen-large-desktop: @screen-large;
|
||||
@screen-lg: 1200px;
|
||||
@screen-lg-desktop: @screen-lg;
|
||||
|
||||
// So media queries don't overlap when required, provide a maximum
|
||||
@screen-phone-max: (@screen-small - 1);
|
||||
@screen-small-max: (@screen-medium - 1);
|
||||
@screen-tablet-max: (@screen-desktop - 1);
|
||||
@screen-desktop-max: (@screen-large-desktop - 1);
|
||||
@screen-xs-max: (@screen-sm - 1);
|
||||
@screen-sm-max: (@screen-md - 1);
|
||||
@screen-md-max: (@screen-lg - 1);
|
||||
|
||||
|
||||
// Grid system
|
||||
@@ -600,10 +599,10 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
// Small screen / tablet
|
||||
@container-tablet: ((720px + @grid-gutter-width));
|
||||
@container-tablet: ((720px + @grid-gutter-width));
|
||||
|
||||
// Medium screen / desktop
|
||||
@container-desktop: ((940px + @grid-gutter-width));
|
||||
@container-desktop: ((940px + @grid-gutter-width));
|
||||
|
||||
// Large screen / wide desktop
|
||||
@container-large-desktop: ((1140px + @grid-gutter-width));
|
||||
@container-lg-desktop: ((1140px + @grid-gutter-width));
|
||||
|
||||
Reference in New Issue
Block a user