From 230d6de88aac73077a01f3d66d2bd498d553cb7e Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 21 May 2013 16:25:59 -0400 Subject: Vertical gradients now can have percentages passed in as arguments to allow finer control over the backgrounds it produces --- less/mixins.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index b54b05c4e..779e121a9 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -255,12 +255,12 @@ background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down } - .vertical(@startColor: #555, @endColor: #333) { + .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { background-color: @endColor; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ + background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down } -- cgit v1.2.3 From c47d9932cb8a9d8dedf900f62918e70f7a1f5a50 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 21 May 2013 16:29:35 -0400 Subject: Found editor spacing issues with tabs instead of spaces, formatting to fit the entrance criteria --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 779e121a9..bdd787166 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -257,8 +257,8 @@ } .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { background-color: @endColor; - background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ + background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 background-repeat: repeat-x; -- cgit v1.2.3 From 60575dfb461d5e01d36b564dccc55ef260982081 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 25 May 2013 13:16:15 -0700 Subject: Gradients refactor * Add start and end support to the horizontal gradient as well * Change all variables from camelCase to use-dashes * Better comments in the gradients mixins area * Update current uses of gradients in dropdowns and carousel to specify only two values by direct assignment of variables --- less/carousel.less | 4 +-- less/dropdowns.less | 4 +-- less/mixins.less | 97 +++++++++++++++++++++++++++++++---------------------- 3 files changed, 60 insertions(+), 45 deletions(-) (limited to 'less') diff --git a/less/carousel.less b/less/carousel.less index c1b0e9b9a..31f9b8aff 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -90,13 +90,13 @@ // Set gradients for backgrounds &.left { - #gradient > .horizontal(rgba(0,0,0,.5), rgba(0,0,0,.0001)); + #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); background-color: transparent; } &.right { left: auto; right: 0; - #gradient > .horizontal(rgba(0,0,0,.0001), rgba(0,0,0,.5)); + #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); background-color: transparent; } diff --git a/less/dropdowns.less b/less/dropdowns.less index e2c9805ae..3e0152788 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -68,7 +68,7 @@ .dropdown-submenu:focus > a { text-decoration: none; color: @dropdown-link-hover-color; - #gradient > .vertical(@dropdown-link-hover-bg, darken(@dropdown-link-hover-bg, 5%)); + #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); } // Active state @@ -79,7 +79,7 @@ color: @dropdown-link-active-color; text-decoration: none; outline: 0; - #gradient > .vertical(@dropdown-link-active-bg, darken(@dropdown-link-active-bg, 5%)); + #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); } // Disabled state diff --git a/less/mixins.less b/less/mixins.less index bdd787166..e900351be 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -241,61 +241,71 @@ -// BACKGROUNDS +// GRADIENTS // -------------------------------------------------- -// Gradients #gradient { - .horizontal(@startColor: #555, @endColor: #333) { - background-color: @endColor; - background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ - background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10 + + // Horizontal gradient, from left to right + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + .horizontal(@start-color: #555; @start-percent: 0%; @end-color: #333; @end-percent: 100%) { + background-color: @end-color; + background-image: -webkit-gradient(linear, @start-percent top, @end-percent top, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // FF 3.6+ + background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10 background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down } - .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { - background-color: @endColor; - background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ - background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 + + // Vertical gradient, from top to bottom + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + .vertical(@start-color: #555; @start-percent: 0%; @end-color: #333; @end-percent: 100%) { + background-color: @end-color; + background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @start-color, @start-percent, @end-color, @end-percent); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // FF 3.6+ + background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10 background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down } - .directional(@startColor: #555, @endColor: #333, @deg: 45deg) { - background-color: @endColor; + + .directional(@start-color: #555, @end-color: #333, @deg: 45deg) { + background-color: @end-color; background-repeat: repeat-x; - background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ - background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10 + background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(@deg, @start-color, @end-color); // FF 3.6+ + background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10 } - .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { - background-color: mix(@midColor, @endColor, 80%); - background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); - background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); - background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); - background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor); + .horizontal-three-colors(@start-color: #00b3ee, @mid-color: #7a43b6, @color-stop: 50%, @end-color: #c3325f) { + background-color: mix(@mid-color, @end-color, 80%); + background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color)); + background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); + background-image: -moz-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); + background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color); background-repeat: no-repeat; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback } - .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { - background-color: mix(@midColor, @endColor, 80%); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); - background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); - background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); - background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); + .vertical-three-colors(@start-color: #00b3ee, @mid-color: #7a43b6, @color-stop: 50%, @end-color: #c3325f) { + background-color: mix(@mid-color, @end-color, 80%); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@start-color), color-stop(@color-stop, @mid-color), to(@end-color)); + background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color); + background-image: -moz-linear-gradient(top, @start-color, @mid-color @color-stop, @end-color); + background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color); background-repeat: no-repeat; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback } - .radial(@innerColor: #555, @outerColor: #333) { - background-color: @outerColor; - background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor)); - background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor); - background-image: -moz-radial-gradient(circle, @innerColor, @outerColor); - background-image: radial-gradient(circle, @innerColor, @outerColor); + .radial(@inner-color: #555, @outer-color: #333) { + background-color: @outer-color; + background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@inner-color), to(@outer-color)); + background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color); + background-image: -moz-radial-gradient(circle, @inner-color, @outer-color); + background-image: radial-gradient(circle, @inner-color, @outer-color); background-repeat: no-repeat; } .striped(@color: #555, @angle: 45deg) { @@ -306,12 +316,17 @@ background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); } } + // Reset filters for IE +// +// When you need to remove a gradient background, don't forget to use this to reset +// the IE filter for IE9 and below. .reset-filter() { filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); } + // RETINA IMAGE SUPPORT // -------------------------------------------------- -- cgit v1.2.3 From 2b088ef44e9476a6336487c65d42b74213cd2a19 Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Mon, 27 May 2013 19:33:14 +0300 Subject: using screen-size variables for grids --- less/grid.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 82d2a355b..1be9dfd18 100644 --- a/less/grid.less +++ b/less/grid.less @@ -39,21 +39,21 @@ // Responsive: Tablets and up @media screen and (min-width: @screen-tablet) { .container { - max-width: 728px; + max-width: (@screen-tablet - 40); } } // Responsive: Desktops and up @media screen and (min-width: @screen-desktop) { .container { - max-width: 940px; + max-width: (@screen-desktop - 52); } } // Responsive: Large desktops and up @media screen and (min-width: @screen-large-desktop) { .container { - max-width: 1170px; + max-width: (@screen-large-desktop - @grid-gutter-width); } } -- cgit v1.2.3 From 6fda25b4c16df2d34d298b373a64ef6f41da7a5a Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Mon, 27 May 2013 23:00:39 +0300 Subject: Adding variables for container sizes --- less/grid.less | 6 +++--- less/variables.less | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 1be9dfd18..6d5a8e345 100644 --- a/less/grid.less +++ b/less/grid.less @@ -39,21 +39,21 @@ // Responsive: Tablets and up @media screen and (min-width: @screen-tablet) { .container { - max-width: (@screen-tablet - 40); + max-width: @container-tablet; } } // Responsive: Desktops and up @media screen and (min-width: @screen-desktop) { .container { - max-width: (@screen-desktop - 52); + max-width: @container-desktop; } } // Responsive: Large desktops and up @media screen and (min-width: @screen-large-desktop) { .container { - max-width: (@screen-large-desktop - @grid-gutter-width); + max-width: @container-large-desktop; } } diff --git a/less/variables.less b/less/variables.less index 9cd8f830b..97aac8395 100644 --- a/less/variables.less +++ b/less/variables.less @@ -405,6 +405,19 @@ @screen-large-desktop: @screen-large; +// Container sizes +// -------------------------------------------------- + +// Small screen / tablet +@container-tablet: 728px; + +// Medium screen / desktop +@container-desktop: 940px; + +// Large screen / wide desktop +@container-large-desktop: 1170px; + + // Grid system // -------------------------------------------------- -- cgit v1.2.3 From c89a6edf090348693a3dd7d43cc2812009249d30 Mon Sep 17 00:00:00 2001 From: Javier Martinez Fernandez Date: Wed, 29 May 2013 22:09:33 +0300 Subject: Remove form-actions-bg If form-actions has been removed, this variable is no needed anymore. --- less/variables.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index 9cd8f830b..a6c69430e 100644 --- a/less/variables.less +++ b/less/variables.less @@ -131,8 +131,6 @@ @input-height-large: (@line-height-computed + (@padding-large-vertical * 2)); @input-height-small: (@line-height-computed + (@padding-small-vertical * 2)); -@form-actions-bg: #f5f5f5; - // Dropdowns // ------------------------- -- cgit v1.2.3 From 19d0726609f860d4a7f1c214965164084aaf8a5f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 2 Jun 2013 13:38:45 -0700 Subject: Grid updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed mixins for generating grid classes - Thus, we manually declare every grid class, from 1-11 (12th unit is excluded as that's the same as no grid columns) - No more need for `.col` base class (yay!) - Negative indent the rows at tablets and above once again (ugh, still working through this part) - Add support for `.col-md` for tablet-specific grid columns - Still need to figure out offsets, pushes, and pulls on other devices—right now only available on desktop --- less/grid.less | 113 +++++++++++++++++++++++++++++++++++++++++++++++++------ less/mixins.less | 78 +++----------------------------------- 2 files changed, 106 insertions(+), 85 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 6d5a8e345..23aa069e3 100644 --- a/less/grid.less +++ b/less/grid.less @@ -13,9 +13,29 @@ .make-row(); } - // Common styles for small and large grid columns -.col { +.col-1, +.col-2, +.col-3, +.col-4, +.col-5, +.col-6, +.col-7, +.col-8, +.col-9, +.col-10, +.col-11, +.col-lg-1, +.col-lg-2, +.col-lg-3, +.col-lg-4, +.col-lg-5, +.col-lg-6, +.col-lg-7, +.col-lg-8, +.col-lg-9, +.col-lg-10, +.col-lg-11 { position: relative; // Float and set width: 100%; for easy stacking on mobile devices float: left; @@ -27,14 +47,88 @@ padding-right: (@grid-gutter-width / 2); } -// Generate small grid classes first -.generate-grid-columns(@grid-columns); +// Grid column sizing + +// Small columns (phones and up) +.col-1 { width: (1 / @grid-columns); } +.col-2 { width: (2 / @grid-columns); } +.col-3 { width: (3 / @grid-columns); } +.col-4 { width: (4 / @grid-columns); } +.col-5 { width: (5 / @grid-columns); } +.col-6 { width: (6 / @grid-columns); } +.col-7 { width: (7 / @grid-columns); } +.col-8 { width: (8 / @grid-columns); } +.col-9 { width: (9 / @grid-columns); } +.col-10 { width: (10/ @grid-columns); } +.col-11 { width: (11/ @grid-columns); } -// Then generate the larger grid classes via media query -@media screen and (min-width: @screen-small) { - .generate-large-grid-columns(@grid-columns); +// Medium columns (tablets and up) +@media (min-width: @screen-tablet) { + .col-md-1 { width: (1 / @grid-columns); } + .col-md-2 { width: (2 / @grid-columns); } + .col-md-3 { width: (3 / @grid-columns); } + .col-md-4 { width: (4 / @grid-columns); } + .col-md-5 { width: (5 / @grid-columns); } + .col-md-6 { width: (6 / @grid-columns); } + .col-md-7 { width: (7 / @grid-columns); } + .col-md-8 { width: (8 / @grid-columns); } + .col-md-9 { width: (9 / @grid-columns); } + .col-md-10 { width: (10/ @grid-columns); } + .col-md-11 { width: (11/ @grid-columns); } } +@media (min-width: @screen-desktop) { + // Large columns (desktop and up) + .col-lg-1 { width: percentage(1 / @grid-columns); } + .col-lg-2 { width: percentage(2 / @grid-columns); } + .col-lg-3 { width: percentage(3 / @grid-columns); } + .col-lg-4 { width: percentage(4 / @grid-columns); } + .col-lg-5 { width: percentage(5 / @grid-columns); } + .col-lg-6 { width: percentage(6 / @grid-columns); } + .col-lg-7 { width: percentage(7 / @grid-columns); } + .col-lg-8 { width: percentage(8 / @grid-columns); } + .col-lg-9 { width: percentage(9 / @grid-columns); } + .col-lg-10 { width: percentage(10/ @grid-columns); } + .col-lg-11 { width: percentage(11/ @grid-columns); } + + // Offsets + .col-offset-1 { margin-left: percentage(1 / @grid-columns); } + .col-offset-2 { margin-left: percentage(2 / @grid-columns); } + .col-offset-3 { margin-left: percentage(3 / @grid-columns); } + .col-offset-4 { margin-left: percentage(4 / @grid-columns); } + .col-offset-5 { margin-left: percentage(5 / @grid-columns); } + .col-offset-6 { margin-left: percentage(6 / @grid-columns); } + .col-offset-7 { margin-left: percentage(7 / @grid-columns); } + .col-offset-8 { margin-left: percentage(8 / @grid-columns); } + .col-offset-9 { margin-left: percentage(9 / @grid-columns); } + .col-offset-10 { margin-left: percentage(10/ @grid-columns); } + .col-offset-11 { margin-left: percentage(11/ @grid-columns); } + + // Push and pull columns for source order changes + .col-push-1 { left: percentage(1 / @grid-columns); } + .col-push-2 { left: percentage(2 / @grid-columns); } + .col-push-3 { left: percentage(3 / @grid-columns); } + .col-push-4 { left: percentage(4 / @grid-columns); } + .col-push-5 { left: percentage(5 / @grid-columns); } + .col-push-6 { left: percentage(6 / @grid-columns); } + .col-push-7 { left: percentage(7 / @grid-columns); } + .col-push-8 { left: percentage(8 / @grid-columns); } + .col-push-9 { left: percentage(9 / @grid-columns); } + .col-push-10 { left: percentage(10/ @grid-columns); } + .col-push-11 { left: percentage(11/ @grid-columns); } + + .col-pull-1 { right: percentage(1 / @grid-columns); } + .col-pull-2 { right: percentage(2 / @grid-columns); } + .col-pull-3 { right: percentage(3 / @grid-columns); } + .col-pull-4 { right: percentage(4 / @grid-columns); } + .col-pull-5 { right: percentage(5 / @grid-columns); } + .col-pull-6 { right: percentage(6 / @grid-columns); } + .col-pull-7 { right: percentage(7 / @grid-columns); } + .col-pull-8 { right: percentage(8 / @grid-columns); } + .col-pull-9 { right: percentage(9 / @grid-columns); } + .col-pull-10 { right: percentage(10/ @grid-columns); } + .col-pull-11 { right: percentage(11/ @grid-columns); } +} // Responsive: Tablets and up @media screen and (min-width: @screen-tablet) { @@ -56,8 +150,3 @@ max-width: @container-large-desktop; } } - -// Reset utility classes due to specificity -/*[class*="col-span-"].pull-right { - float: right; -}*/ diff --git a/less/mixins.less b/less/mixins.less index e900351be..d4c628e13 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -419,6 +419,11 @@ // Then clear the floated columns .clearfix(); + @media (min-width: @screen-small) { + margin-left: (@grid-gutter-width / -2); + margin-right: (@grid-gutter-width / -2); + } + // Negative margin nested rows out to align the content of columns .row { margin-left: (@grid-gutter-width / -2); @@ -459,79 +464,6 @@ } } -// Small grid columns -.generate-grid-columns(@grid-columns) { - - .col-sm-X (@index) when (@index > 0) { - .col-sm-@{index} { .col-sm-(@index); } - .col-sm-X((@index - 1)); - } - .col-sm-X (0) {} - - // Generate columns - .col-sm-X(@grid-columns); - - // Apply the styles - .col-sm-(@columns) { - width: percentage((@columns / @grid-columns)); - } -} - -// Large grid columns -.generate-large-grid-columns(@grid-columns) { - - .col-lg-X (@index) when (@index > 0) { - .col-lg-@{index} { .col-lg-(@index); } - .col-lg-X((@index - 1)); - } - .col-lg-X (0) {} - - // Generate the columns - .col-lg-X(@grid-columns); - - // Apply the styles - .col-lg-(@columns) { - width: percentage((@columns / @grid-columns)); - } - - // Offsets (gaps between columns) - .col-offset-X (@index) when (@index > 0) { - .col-offset-@{index} { .col-offset-(@index); } - .col-offset-X((@index - 1)); - } - .col-offset-X (0) {} - - // Source ordering - .col-push-X (@index) when (@index > 0) { - .col-push-@{index} { .col-push-(@index); } - .col-push-X((@index - 1)); - } - .col-push-X (0) {} - - // Source ordering - .col-pull-X (@index) when (@index > 0) { - .col-pull-@{index} { .col-pull-(@index); } - .col-pull-X((@index - 1)); - } - .col-pull-X (0) {} - - // Apply the styles - .col-offset-(@columns) { - margin-left: percentage((@columns / @grid-columns)); - } - .col-push-(@columns) { - left: percentage((@columns / @grid-columns)); - } - .col-pull-(@columns) { - right: percentage((@columns / @grid-columns)); - } - - // Generate .spanX and .offsetX - .col-offset-X(@grid-columns); - .col-push-X(@grid-columns); - .col-pull-X(@grid-columns); -} - // Framework mixins -- cgit v1.2.3 From 21441f129259b17c6112d923dc93d4fc4577e49b Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 2 Jun 2013 15:33:42 -0700 Subject: Move the grid offset, push, and pull classes to be tablets-up instead of desktop-up --- less/grid.less | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 23aa069e3..82b7b60c8 100644 --- a/less/grid.less +++ b/less/grid.less @@ -75,21 +75,6 @@ .col-md-9 { width: (9 / @grid-columns); } .col-md-10 { width: (10/ @grid-columns); } .col-md-11 { width: (11/ @grid-columns); } -} - -@media (min-width: @screen-desktop) { - // Large columns (desktop and up) - .col-lg-1 { width: percentage(1 / @grid-columns); } - .col-lg-2 { width: percentage(2 / @grid-columns); } - .col-lg-3 { width: percentage(3 / @grid-columns); } - .col-lg-4 { width: percentage(4 / @grid-columns); } - .col-lg-5 { width: percentage(5 / @grid-columns); } - .col-lg-6 { width: percentage(6 / @grid-columns); } - .col-lg-7 { width: percentage(7 / @grid-columns); } - .col-lg-8 { width: percentage(8 / @grid-columns); } - .col-lg-9 { width: percentage(9 / @grid-columns); } - .col-lg-10 { width: percentage(10/ @grid-columns); } - .col-lg-11 { width: percentage(11/ @grid-columns); } // Offsets .col-offset-1 { margin-left: percentage(1 / @grid-columns); } @@ -130,6 +115,21 @@ .col-pull-11 { right: percentage(11/ @grid-columns); } } +@media (min-width: @screen-desktop) { + // Large columns (desktop and up) + .col-lg-1 { width: percentage(1 / @grid-columns); } + .col-lg-2 { width: percentage(2 / @grid-columns); } + .col-lg-3 { width: percentage(3 / @grid-columns); } + .col-lg-4 { width: percentage(4 / @grid-columns); } + .col-lg-5 { width: percentage(5 / @grid-columns); } + .col-lg-6 { width: percentage(6 / @grid-columns); } + .col-lg-7 { width: percentage(7 / @grid-columns); } + .col-lg-8 { width: percentage(8 / @grid-columns); } + .col-lg-9 { width: percentage(9 / @grid-columns); } + .col-lg-10 { width: percentage(10/ @grid-columns); } + .col-lg-11 { width: percentage(11/ @grid-columns); } +} + // Responsive: Tablets and up @media screen and (min-width: @screen-tablet) { .container { -- cgit v1.2.3 From 2f70477621fd45d0dd52284b7ca7e0a72319d4e1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 2 Jun 2013 15:51:28 -0700 Subject: fixes #8059: update navbar responsive break variable --- less/navbar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 0576022d1..84fd742b1 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -274,7 +274,7 @@ // Responsive navbar // -------------------------------------------------- -@media screen and (min-width: @screen-tablet) { +@media screen and (min-width: @grid-float-breakpoint) { .navbar-brand { float: left; -- cgit v1.2.3 From a05f6d4cea03a61f35223eab697d3caa4dc9e24c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 3 Jun 2013 11:58:38 -0700 Subject: fixes #8066: add missing % functions to grid less code --- less/grid.less | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 82b7b60c8..d2b9a4e70 100644 --- a/less/grid.less +++ b/less/grid.less @@ -50,31 +50,31 @@ // Grid column sizing // Small columns (phones and up) -.col-1 { width: (1 / @grid-columns); } -.col-2 { width: (2 / @grid-columns); } -.col-3 { width: (3 / @grid-columns); } -.col-4 { width: (4 / @grid-columns); } -.col-5 { width: (5 / @grid-columns); } -.col-6 { width: (6 / @grid-columns); } -.col-7 { width: (7 / @grid-columns); } -.col-8 { width: (8 / @grid-columns); } -.col-9 { width: (9 / @grid-columns); } -.col-10 { width: (10/ @grid-columns); } -.col-11 { width: (11/ @grid-columns); } +.col-1 { width: percentage(1 / @grid-columns); } +.col-2 { width: percentage(2 / @grid-columns); } +.col-3 { width: percentage(3 / @grid-columns); } +.col-4 { width: percentage(4 / @grid-columns); } +.col-5 { width: percentage(5 / @grid-columns); } +.col-6 { width: percentage(6 / @grid-columns); } +.col-7 { width: percentage(7 / @grid-columns); } +.col-8 { width: percentage(8 / @grid-columns); } +.col-9 { width: percentage(9 / @grid-columns); } +.col-10 { width: percentage(10/ @grid-columns); } +.col-11 { width: percentage(11/ @grid-columns); } // Medium columns (tablets and up) @media (min-width: @screen-tablet) { - .col-md-1 { width: (1 / @grid-columns); } - .col-md-2 { width: (2 / @grid-columns); } - .col-md-3 { width: (3 / @grid-columns); } - .col-md-4 { width: (4 / @grid-columns); } - .col-md-5 { width: (5 / @grid-columns); } - .col-md-6 { width: (6 / @grid-columns); } - .col-md-7 { width: (7 / @grid-columns); } - .col-md-8 { width: (8 / @grid-columns); } - .col-md-9 { width: (9 / @grid-columns); } - .col-md-10 { width: (10/ @grid-columns); } - .col-md-11 { width: (11/ @grid-columns); } + .col-md-1 { width: percentage(1 / @grid-columns); } + .col-md-2 { width: percentage(2 / @grid-columns); } + .col-md-3 { width: percentage(3 / @grid-columns); } + .col-md-4 { width: percentage(4 / @grid-columns); } + .col-md-5 { width: percentage(5 / @grid-columns); } + .col-md-6 { width: percentage(6 / @grid-columns); } + .col-md-7 { width: percentage(7 / @grid-columns); } + .col-md-8 { width: percentage(8 / @grid-columns); } + .col-md-9 { width: percentage(9 / @grid-columns); } + .col-md-10 { width: percentage(10/ @grid-columns); } + .col-md-11 { width: percentage(11/ @grid-columns); } // Offsets .col-offset-1 { margin-left: percentage(1 / @grid-columns); } -- cgit v1.2.3 From 286955167a53862fdde84359ab3c21a1e4237627 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 3 Jun 2013 21:48:52 -0700 Subject: prep for less 1.4 with double parens in functions --- less/grid.less | 132 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index d2b9a4e70..d4320c418 100644 --- a/less/grid.less +++ b/less/grid.less @@ -50,84 +50,84 @@ // Grid column sizing // Small columns (phones and up) -.col-1 { width: percentage(1 / @grid-columns); } -.col-2 { width: percentage(2 / @grid-columns); } -.col-3 { width: percentage(3 / @grid-columns); } -.col-4 { width: percentage(4 / @grid-columns); } -.col-5 { width: percentage(5 / @grid-columns); } -.col-6 { width: percentage(6 / @grid-columns); } -.col-7 { width: percentage(7 / @grid-columns); } -.col-8 { width: percentage(8 / @grid-columns); } -.col-9 { width: percentage(9 / @grid-columns); } -.col-10 { width: percentage(10/ @grid-columns); } -.col-11 { width: percentage(11/ @grid-columns); } +.col-1 { width: percentage((1 / @grid-columns)); } +.col-2 { width: percentage((2 / @grid-columns)); } +.col-3 { width: percentage((3 / @grid-columns)); } +.col-4 { width: percentage((4 / @grid-columns)); } +.col-5 { width: percentage((5 / @grid-columns)); } +.col-6 { width: percentage((6 / @grid-columns)); } +.col-7 { width: percentage((7 / @grid-columns)); } +.col-8 { width: percentage((8 / @grid-columns)); } +.col-9 { width: percentage((9 / @grid-columns)); } +.col-10 { width: percentage((10/ @grid-columns)); } +.col-11 { width: percentage((11/ @grid-columns)); } // Medium columns (tablets and up) @media (min-width: @screen-tablet) { - .col-md-1 { width: percentage(1 / @grid-columns); } - .col-md-2 { width: percentage(2 / @grid-columns); } - .col-md-3 { width: percentage(3 / @grid-columns); } - .col-md-4 { width: percentage(4 / @grid-columns); } - .col-md-5 { width: percentage(5 / @grid-columns); } - .col-md-6 { width: percentage(6 / @grid-columns); } - .col-md-7 { width: percentage(7 / @grid-columns); } - .col-md-8 { width: percentage(8 / @grid-columns); } - .col-md-9 { width: percentage(9 / @grid-columns); } - .col-md-10 { width: percentage(10/ @grid-columns); } - .col-md-11 { width: percentage(11/ @grid-columns); } + .col-md-1 { width: percentage((1 / @grid-columns)); } + .col-md-2 { width: percentage((2 / @grid-columns)); } + .col-md-3 { width: percentage((3 / @grid-columns)); } + .col-md-4 { width: percentage((4 / @grid-columns)); } + .col-md-5 { width: percentage((5 / @grid-columns)); } + .col-md-6 { width: percentage((6 / @grid-columns)); } + .col-md-7 { width: percentage((7 / @grid-columns)); } + .col-md-8 { width: percentage((8 / @grid-columns)); } + .col-md-9 { width: percentage((9 / @grid-columns)); } + .col-md-10 { width: percentage((10/ @grid-columns)); } + .col-md-11 { width: percentage((11/ @grid-columns)); } // Offsets - .col-offset-1 { margin-left: percentage(1 / @grid-columns); } - .col-offset-2 { margin-left: percentage(2 / @grid-columns); } - .col-offset-3 { margin-left: percentage(3 / @grid-columns); } - .col-offset-4 { margin-left: percentage(4 / @grid-columns); } - .col-offset-5 { margin-left: percentage(5 / @grid-columns); } - .col-offset-6 { margin-left: percentage(6 / @grid-columns); } - .col-offset-7 { margin-left: percentage(7 / @grid-columns); } - .col-offset-8 { margin-left: percentage(8 / @grid-columns); } - .col-offset-9 { margin-left: percentage(9 / @grid-columns); } - .col-offset-10 { margin-left: percentage(10/ @grid-columns); } - .col-offset-11 { margin-left: percentage(11/ @grid-columns); } + .col-offset-1 { margin-left: percentage((1 / @grid-columns)); } + .col-offset-2 { margin-left: percentage((2 / @grid-columns)); } + .col-offset-3 { margin-left: percentage((3 / @grid-columns)); } + .col-offset-4 { margin-left: percentage((4 / @grid-columns)); } + .col-offset-5 { margin-left: percentage((5 / @grid-columns)); } + .col-offset-6 { margin-left: percentage((6 / @grid-columns)); } + .col-offset-7 { margin-left: percentage((7 / @grid-columns)); } + .col-offset-8 { margin-left: percentage((8 / @grid-columns)); } + .col-offset-9 { margin-left: percentage((9 / @grid-columns)); } + .col-offset-10 { margin-left: percentage((10/ @grid-columns)); } + .col-offset-11 { margin-left: percentage((11/ @grid-columns)); } // Push and pull columns for source order changes - .col-push-1 { left: percentage(1 / @grid-columns); } - .col-push-2 { left: percentage(2 / @grid-columns); } - .col-push-3 { left: percentage(3 / @grid-columns); } - .col-push-4 { left: percentage(4 / @grid-columns); } - .col-push-5 { left: percentage(5 / @grid-columns); } - .col-push-6 { left: percentage(6 / @grid-columns); } - .col-push-7 { left: percentage(7 / @grid-columns); } - .col-push-8 { left: percentage(8 / @grid-columns); } - .col-push-9 { left: percentage(9 / @grid-columns); } - .col-push-10 { left: percentage(10/ @grid-columns); } - .col-push-11 { left: percentage(11/ @grid-columns); } + .col-push-1 { left: percentage((1 / @grid-columns)); } + .col-push-2 { left: percentage((2 / @grid-columns)); } + .col-push-3 { left: percentage((3 / @grid-columns)); } + .col-push-4 { left: percentage((4 / @grid-columns)); } + .col-push-5 { left: percentage((5 / @grid-columns)); } + .col-push-6 { left: percentage((6 / @grid-columns)); } + .col-push-7 { left: percentage((7 / @grid-columns)); } + .col-push-8 { left: percentage((8 / @grid-columns)); } + .col-push-9 { left: percentage((9 / @grid-columns)); } + .col-push-10 { left: percentage((10/ @grid-columns)); } + .col-push-11 { left: percentage((11/ @grid-columns)); } - .col-pull-1 { right: percentage(1 / @grid-columns); } - .col-pull-2 { right: percentage(2 / @grid-columns); } - .col-pull-3 { right: percentage(3 / @grid-columns); } - .col-pull-4 { right: percentage(4 / @grid-columns); } - .col-pull-5 { right: percentage(5 / @grid-columns); } - .col-pull-6 { right: percentage(6 / @grid-columns); } - .col-pull-7 { right: percentage(7 / @grid-columns); } - .col-pull-8 { right: percentage(8 / @grid-columns); } - .col-pull-9 { right: percentage(9 / @grid-columns); } - .col-pull-10 { right: percentage(10/ @grid-columns); } - .col-pull-11 { right: percentage(11/ @grid-columns); } + .col-pull-1 { right: percentage((1 / @grid-columns)); } + .col-pull-2 { right: percentage((2 / @grid-columns)); } + .col-pull-3 { right: percentage((3 / @grid-columns)); } + .col-pull-4 { right: percentage((4 / @grid-columns)); } + .col-pull-5 { right: percentage((5 / @grid-columns)); } + .col-pull-6 { right: percentage((6 / @grid-columns)); } + .col-pull-7 { right: percentage((7 / @grid-columns)); } + .col-pull-8 { right: percentage((8 / @grid-columns)); } + .col-pull-9 { right: percentage((9 / @grid-columns)); } + .col-pull-10 { right: percentage((10/ @grid-columns)); } + .col-pull-11 { right: percentage((11/ @grid-columns)); } } @media (min-width: @screen-desktop) { // Large columns (desktop and up) - .col-lg-1 { width: percentage(1 / @grid-columns); } - .col-lg-2 { width: percentage(2 / @grid-columns); } - .col-lg-3 { width: percentage(3 / @grid-columns); } - .col-lg-4 { width: percentage(4 / @grid-columns); } - .col-lg-5 { width: percentage(5 / @grid-columns); } - .col-lg-6 { width: percentage(6 / @grid-columns); } - .col-lg-7 { width: percentage(7 / @grid-columns); } - .col-lg-8 { width: percentage(8 / @grid-columns); } - .col-lg-9 { width: percentage(9 / @grid-columns); } - .col-lg-10 { width: percentage(10/ @grid-columns); } - .col-lg-11 { width: percentage(11/ @grid-columns); } + .col-lg-1 { width: percentage((1 / @grid-columns)); } + .col-lg-2 { width: percentage((2 / @grid-columns)); } + .col-lg-3 { width: percentage((3 / @grid-columns)); } + .col-lg-4 { width: percentage((4 / @grid-columns)); } + .col-lg-5 { width: percentage((5 / @grid-columns)); } + .col-lg-6 { width: percentage((6 / @grid-columns)); } + .col-lg-7 { width: percentage((7 / @grid-columns)); } + .col-lg-8 { width: percentage((8 / @grid-columns)); } + .col-lg-9 { width: percentage((9 / @grid-columns)); } + .col-lg-10 { width: percentage((10/ @grid-columns)); } + .col-lg-11 { width: percentage((11/ @grid-columns)); } } // Responsive: Tablets and up -- cgit v1.2.3 From 45c5b4e45c1d6479801dc205e13b350e334ebcd0 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 3 Jun 2013 21:51:35 -0700 Subject: restore .col-*-12 classes for now --- less/grid.less | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index d4320c418..bb99dff7e 100644 --- a/less/grid.less +++ b/less/grid.less @@ -25,6 +25,7 @@ .col-9, .col-10, .col-11, +.col-12, .col-lg-1, .col-lg-2, .col-lg-3, @@ -35,7 +36,8 @@ .col-lg-8, .col-lg-9, .col-lg-10, -.col-lg-11 { +.col-lg-11, +.col-lg-12 { position: relative; // Float and set width: 100%; for easy stacking on mobile devices float: left; @@ -61,6 +63,7 @@ .col-9 { width: percentage((9 / @grid-columns)); } .col-10 { width: percentage((10/ @grid-columns)); } .col-11 { width: percentage((11/ @grid-columns)); } +.col-12 { width: 100%; } // Medium columns (tablets and up) @media (min-width: @screen-tablet) { @@ -75,6 +78,7 @@ .col-md-9 { width: percentage((9 / @grid-columns)); } .col-md-10 { width: percentage((10/ @grid-columns)); } .col-md-11 { width: percentage((11/ @grid-columns)); } + .col-md-12 { width: 100%; } // Offsets .col-offset-1 { margin-left: percentage((1 / @grid-columns)); } @@ -128,6 +132,7 @@ .col-lg-9 { width: percentage((9 / @grid-columns)); } .col-lg-10 { width: percentage((10/ @grid-columns)); } .col-lg-11 { width: percentage((11/ @grid-columns)); } + .col-lg-12 { width: 100%; } } // Responsive: Tablets and up -- cgit v1.2.3 From df5ddeb7cc3b71c96b691e073c252690679dd4ea Mon Sep 17 00:00:00 2001 From: William Ghelfi Date: Wed, 5 Jun 2013 23:14:58 +0300 Subject: Set validation states also for addons --- less/mixins.less | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index d4c628e13..9825e9a2d 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -486,4 +486,10 @@ .box-shadow(@shadow); } } + // Set validation states also for addons + .input-group-addon { + color: @text-color; + border-color: @border-color; + background-color: @background-color; + } } -- cgit v1.2.3 From 441bbe1998c790dad1c4d44c5f85e6360209eaac Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 8 Jun 2013 18:34:16 -0230 Subject: Another grid update * Update docs to include table of grid levels and behaviors * Change from .col-md to .col-sm to match existing size variables we use elsewhere * Keep .col-lg as-is though for simplicity as we won't likely add a fourth level of the grid * Combine responsive .container breakpoints with grid breakpoints in grid.less * Other misc docs updates --- less/grid.less | 73 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 32 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index bb99dff7e..b97d1d5c4 100644 --- a/less/grid.less +++ b/less/grid.less @@ -26,6 +26,18 @@ .col-10, .col-11, .col-12, +.col-sm-1, +.col-sm-2, +.col-sm-3, +.col-sm-4, +.col-sm-5, +.col-sm-6, +.col-sm-7, +.col-sm-8, +.col-sm-9, +.col-sm-10, +.col-sm-11, +.col-sm-12, .col-lg-1, .col-lg-2, .col-lg-3, @@ -49,9 +61,13 @@ padding-right: (@grid-gutter-width / 2); } -// Grid column sizing -// Small columns (phones and up) + +// +// Container and grid column sizing +// + +// Tiny device columns (smartphones) .col-1 { width: percentage((1 / @grid-columns)); } .col-2 { width: percentage((2 / @grid-columns)); } .col-3 { width: percentage((3 / @grid-columns)); } @@ -65,20 +81,24 @@ .col-11 { width: percentage((11/ @grid-columns)); } .col-12 { width: 100%; } -// Medium columns (tablets and up) +// Small device columns (phones to tablets) @media (min-width: @screen-tablet) { - .col-md-1 { width: percentage((1 / @grid-columns)); } - .col-md-2 { width: percentage((2 / @grid-columns)); } - .col-md-3 { width: percentage((3 / @grid-columns)); } - .col-md-4 { width: percentage((4 / @grid-columns)); } - .col-md-5 { width: percentage((5 / @grid-columns)); } - .col-md-6 { width: percentage((6 / @grid-columns)); } - .col-md-7 { width: percentage((7 / @grid-columns)); } - .col-md-8 { width: percentage((8 / @grid-columns)); } - .col-md-9 { width: percentage((9 / @grid-columns)); } - .col-md-10 { width: percentage((10/ @grid-columns)); } - .col-md-11 { width: percentage((11/ @grid-columns)); } - .col-md-12 { width: 100%; } + .container { + max-width: @container-tablet; + } + + .col-sm-1 { width: percentage((1 / @grid-columns)); } + .col-sm-2 { width: percentage((2 / @grid-columns)); } + .col-sm-3 { width: percentage((3 / @grid-columns)); } + .col-sm-4 { width: percentage((4 / @grid-columns)); } + .col-sm-5 { width: percentage((5 / @grid-columns)); } + .col-sm-6 { width: percentage((6 / @grid-columns)); } + .col-sm-7 { width: percentage((7 / @grid-columns)); } + .col-sm-8 { width: percentage((8 / @grid-columns)); } + .col-sm-9 { width: percentage((9 / @grid-columns)); } + .col-sm-10 { width: percentage((10/ @grid-columns)); } + .col-sm-11 { width: percentage((11/ @grid-columns)); } + .col-sm-12 { width: 100%; } // Offsets .col-offset-1 { margin-left: percentage((1 / @grid-columns)); } @@ -119,8 +139,11 @@ .col-pull-11 { right: percentage((11/ @grid-columns)); } } +// Medium and large device columns (desktop and up) @media (min-width: @screen-desktop) { - // Large columns (desktop and up) + .container { + max-width: @container-desktop; + } .col-lg-1 { width: percentage((1 / @grid-columns)); } .col-lg-2 { width: percentage((2 / @grid-columns)); } .col-lg-3 { width: percentage((3 / @grid-columns)); } @@ -135,22 +158,8 @@ .col-lg-12 { width: 100%; } } -// Responsive: Tablets and up -@media screen and (min-width: @screen-tablet) { - .container { - max-width: @container-tablet; - } -} - -// Responsive: Desktops and up -@media screen and (min-width: @screen-desktop) { - .container { - max-width: @container-desktop; - } -} - -// Responsive: Large desktops and up -@media screen and (min-width: @screen-large-desktop) { +// Large desktops and up +@media (min-width: @screen-large-desktop) { .container { max-width: @container-large-desktop; } -- cgit v1.2.3