From ab3d0a27b3d93eebff3852728f94ddc4fcb35199 Mon Sep 17 00:00:00 2001 From: Chris Ziogas Date: Mon, 16 Sep 2013 12:38:26 +0300 Subject: Dropdown in panel header does not inherit its colors Fix for issue #10627 --- less/mixins.less | 3 +++ 1 file changed, 3 insertions(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 42523c2aa..f8afa0eeb 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -396,6 +396,9 @@ + .panel-collapse .panel-body { border-top-color: @border; } + & > .dropdown .caret { + border-color: @heading-text-color transparent; + } } & > .panel-footer { + .panel-collapse .panel-body { -- cgit v1.2.3 From 355525b2b7b1df9119068fb1de4c411c8315ced5 Mon Sep 17 00:00:00 2001 From: Shaun Dychko Date: Mon, 30 Sep 2013 13:21:54 -0700 Subject: remove comma separating the color and the color-stop in -webkit-linear-gradient in the #gradient .vertical mixin. --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 6e0e399af..7438deacd 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -287,7 +287,7 @@ // Color stops are not available in IE9 and below. .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { 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: -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; -- cgit v1.2.3 From c814ad18333d7deefd3bff5446b02d6933f49f02 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 11 Oct 2013 22:00:37 -0700 Subject: Combine separate efforts for grid mixins into one, cleanup and reorganize --- less/mixins.less | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 6e0e399af..654215b54 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -565,6 +565,7 @@ td& { display: none !important; } } + // Grid System // ----------- @@ -696,6 +697,80 @@ } +// Framework grid generation +// +// Used only by Bootstrap to generate the correct number of grid classes given +// any value of `@grid-columns`. + +.make-grid-columns() { + // Common styles for all sizes of grid columns, widths 1-12 + .col(@index) when (@index = 1) { // initial + @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; + .col(@index + 1, @item); + } + .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo + @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; + .col(@index + 1, ~"@{list}, @{item}"); + } + .col(@index, @list) when (@index > @grid-columns) { // terminal + @{list} { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); + } + } + .col(1); // kickstart it +} + +.make-grid-columns-float(@class) { + .col(@index) when (@index = 1) { // initial + @item: ~".col-@{class}-@{index}"; + .col(@index + 1, @item); + } + .col(@index, @list) when (@index < @grid-columns) { // general + @item: ~".col-@{class}-@{index}"; + .col(@index + 1, ~"@{list}, @{item}"); + } + .col(@index, @list) when (@index = @grid-columns) { // terminal + @{list} { + float: left; + } + } + .col(1); // kickstart it +} + +.calc-grid(@index, @class, @type) when (@type = width) { + .col-@{class}-@{index} { + width: percentage((@index / @grid-columns)); + } +} +.calc-grid(@index, @class, @type) when (@type = push) { + .col-@{class}-push-@{index} { + left: percentage((@index / @grid-columns)); + } +} +.calc-grid(@index, @class, @type) when (@type = pull) { + .col-@{class}-pull-@{index} { + right: percentage((@index / @grid-columns)); + } +} +.calc-grid(@index, @class, @type) when (@type = offset) { + .col-@{class}-offset-@{index} { + margin-left: percentage((@index / @grid-columns)); + } +} + +// Basic looping in LESS +.make-grid(@index, @class, @type) when (@index > 0) { + .calc-grid(@index, @class, @type); + // next iteration + .make-grid(@index - 1, @class, @type); +} + + // Form validation states // // Used in forms.less to generate the form validation CSS for warnings, errors, -- cgit v1.2.3 From 0c2055ef381d55388540496996788861fa04b7d8 Mon Sep 17 00:00:00 2001 From: Aaron Borden Date: Wed, 16 Oct 2013 19:02:04 -0700 Subject: Adding contextual styles to list-items --- less/mixins.less | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 654215b54..09c656ca2 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -448,6 +448,21 @@ } } +// List Groups +// ------------------------- +.list-group-item-variant(@state; @background; @border) { + .list-group > .list-group-item.@{state} { + background-color: @background; + border-color: @border; + } + + // Hover states + .list-group > .list-group-item.@{state}:hover { + background-color: darken(@background, 5%); + border-color: darken(@border, 5%); + } +} + // Button variants // ------------------------- // Easily pump out default styles, as well as :hover, :focus, :active, -- cgit v1.2.3 From 693915d1277d465844c6757fc107110342229d76 Mon Sep 17 00:00:00 2001 From: Max Edmands Date: Wed, 16 Oct 2013 22:55:40 -0700 Subject: Active state overrides contextual list-item styles --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 09c656ca2..04bd10ee0 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -451,13 +451,13 @@ // List Groups // ------------------------- .list-group-item-variant(@state; @background; @border) { - .list-group > .list-group-item.@{state} { + .list-group-item.@{state} { background-color: @background; border-color: @border; } // Hover states - .list-group > .list-group-item.@{state}:hover { + .list-group-item.@{state}:hover { background-color: darken(@background, 5%); border-color: darken(@border, 5%); } -- cgit v1.2.3 From dd34102cb6bb601c3103f2c74804d2382271c0e1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 20 Oct 2013 19:54:22 -0700 Subject: Fixes #10522: Enable use of form validation class on .radio, .checkbox, .radio-inline, and .checkbox-inline --- less/mixins.less | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 654215b54..5c9672bcb 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -779,7 +779,11 @@ .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { // Color the label and help text .help-block, - .control-label { + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline { color: @text-color; } // Set the border and box shadow on specific inputs to match -- cgit v1.2.3 From 6585c5898a47deb2df5f7db4f9ef3fe8fa1e5a4a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 20 Oct 2013 22:46:21 -0700 Subject: spacing --- less/mixins.less | 3 +++ 1 file changed, 3 insertions(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 5c9672bcb..e892b88db 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -389,10 +389,12 @@ // ------------------------- .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border;) { border-color: @border; + & > .panel-heading { color: @heading-text-color; background-color: @heading-bg-color; border-color: @heading-border; + + .panel-collapse .panel-body { border-top-color: @border; } @@ -410,6 +412,7 @@ background-color: @background; border-color: @border; color: @text-color; + hr { border-top-color: darken(@border, 5%); } -- cgit v1.2.3 From c865a68e212e6ba35a5049b568f63730ee870a82 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 24 Oct 2013 19:20:08 -0700 Subject: fix WebKit caps in comments --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 62b91f27b..9a4ce3a4c 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -27,11 +27,11 @@ } } -// Webkit-style focus +// WebKit-style focus .tab-focus() { // Default outline: thin dotted #333; - // Webkit + // WebKit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } -- cgit v1.2.3 From 3cd744fd5ec725b0fbba0d69b36e1c1f3bcf018a Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 24 Oct 2013 19:42:48 -0700 Subject: remove ref to nonexistent branch --- less/mixins.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 9a4ce3a4c..4e842ed87 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -203,7 +203,6 @@ // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. // Default value is `visible`, but can be changed to `hidden` -// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples .backface-visibility(@visibility){ -webkit-backface-visibility: @visibility; -moz-backface-visibility: @visibility; -- cgit v1.2.3 From aff291e1ca998591b6615f6bde3e10e1dae2403b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 26 Oct 2013 14:11:59 +0200 Subject: Add .animation() mixin --- less/mixins.less | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 4e842ed87..f06d6a89b 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -193,12 +193,17 @@ -moz-perspective-origin: @perspective; perspective-origin: @perspective; } -.transform-origin(@origin){ +.transform-origin(@origin) { -webkit-transform-origin: @origin; -moz-transform-origin: @origin; transform-origin: @origin; } +// Animations +.animation(@animation) { + -webkit-animation: @animation; + animation: @animation; +} // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. -- cgit v1.2.3 From c6e76d97bab6f174f2f877433985cb11ff9368b1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 28 Oct 2013 21:19:48 -0700 Subject: Fixes #10341: don't change border color on contextual table classes --- less/mixins.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index f06d6a89b..4718cb2c0 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -441,7 +441,6 @@ &.@{state} > td, &.@{state} > th { background-color: @background; - border-color: @border; } } @@ -453,7 +452,6 @@ &.@{state}:hover > td, &.@{state}:hover > th { background-color: darken(@background, 5%); - border-color: darken(@border, 5%); } } } -- cgit v1.2.3 From 88a06640ddc6bba4f05b41666f53c5daeb00fac8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 6 Nov 2013 13:03:08 -0800 Subject: Fixes #11295: Restore offset, push, and pull zero classes (e.g., .col-md-offset-0) --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 4718cb2c0..3d24e668a 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -750,7 +750,7 @@ .col(1); // kickstart it } -.calc-grid(@index, @class, @type) when (@type = width) { +.calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) { .col-@{class}-@{index} { width: percentage((@index / @grid-columns)); } @@ -772,7 +772,7 @@ } // Basic looping in LESS -.make-grid(@index, @class, @type) when (@index > 0) { +.make-grid(@index, @class, @type) when (@index >= 0) { .calc-grid(@index, @class, @type); // next iteration .make-grid(@index - 1, @class, @type); -- cgit v1.2.3 From 96109d3138fd6f5b67fb1108754e81c077630b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 7 Nov 2013 09:53:33 +0100 Subject: Simplify table state styles --- less/mixins.less | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 3d24e668a..0e29c9d3d 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -430,27 +430,27 @@ // Tables // ------------------------- -.table-row-variant(@state; @background; @border) { +.table-row-variant(@state; @background) { // Exact selectors below required to override `.table-striped` and prevent // inheritance to nested tables. - .table > thead > tr, - .table > tbody > tr, - .table > tfoot > tr { - > td.@{state}, - > th.@{state}, - &.@{state} > td, - &.@{state} > th { - background-color: @background; + .table { + > thead, + > tbody, + > tfoot { + > tr > .@{state}, + > .@{state} > td, + > .@{state} > th { + background-color: @background; + } } } // Hover states for `.table-hover` // Note: this is not available for cells or rows within `thead` or `tfoot`. - .table-hover > tbody > tr { - > td.@{state}:hover, - > th.@{state}:hover, - &.@{state}:hover > td, - &.@{state}:hover > th { + .table-hover > tbody { + > tr > .@{state}:hover, + > .@{state}:hover > td, + > .@{state}:hover > th { background-color: darken(@background, 5%); } } -- cgit v1.2.3 From 15fbc4bd06db91de3ee81a1894428e0ab17a5b82 Mon Sep 17 00:00:00 2001 From: Luke McDonald Date: Thu, 7 Nov 2013 09:57:55 -0600 Subject: Don't print .clearfix() comment references --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 3d24e668a..667642a5e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -19,8 +19,8 @@ .clearfix() { &:before, &:after { - content: " "; /* 1 */ - display: table; /* 2 */ + content: " "; // 1 + display: table; // 2 } &:after { clear: both; -- cgit v1.2.3 From 50578dda6072f104921ef1563d2928e5463f64cb Mon Sep 17 00:00:00 2001 From: Erik Flowers Date: Mon, 18 Nov 2013 11:58:14 -0700 Subject: - Firefox placeholder text is faded out and not the full color. Adding opacity:1 to it returns it to the proper color - (this is a re-commit since I messed up my branch last time and failed the travis build) --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 3d24e668a..50ccafa7c 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -55,7 +55,7 @@ // Placeholder text .placeholder(@color: @input-color-placeholder) { &:-moz-placeholder { color: @color; } // Firefox 4-18 - &::-moz-placeholder { color: @color; } // Firefox 19+ + &::-moz-placeholder { color: @color; opacity:1; } // Firefox 19+ &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ &::-webkit-input-placeholder { color: @color; } // Safari and Chrome } -- cgit v1.2.3 From 446f2325a6e4f730939e0fa3e12ba1f5fc53f27f Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 18 Nov 2013 14:22:17 -0800 Subject: add explanatory comment Re: #11526 --- less/mixins.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 50ccafa7c..e76d8d697 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -55,7 +55,8 @@ // Placeholder text .placeholder(@color: @input-color-placeholder) { &:-moz-placeholder { color: @color; } // Firefox 4-18 - &::-moz-placeholder { color: @color; opacity:1; } // Firefox 19+ + &::-moz-placeholder { color: @color; // Firefox 19+ + opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526 &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ &::-webkit-input-placeholder { color: @color; } // Safari and Chrome } -- cgit v1.2.3 From 55af0036699573be96c4ad33a54836d31fb737b5 Mon Sep 17 00:00:00 2001 From: Mario Bonito Date: Tue, 19 Nov 2013 22:24:26 -0500 Subject: removed color treatment of outline --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index e76d8d697..83b93eeb6 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -30,8 +30,8 @@ // WebKit-style focus .tab-focus() { // Default - outline: thin dotted #333; - // WebKit + outline: thin dotted; + //Webkit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } -- cgit v1.2.3 From bd44a4b5f35c38c75744e9c6cdc500f4e451c059 Mon Sep 17 00:00:00 2001 From: Jerri Christiansen Date: Mon, 25 Nov 2013 20:41:00 +0100 Subject: Removed unnecessary semicolon --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index e76d8d697..dff49cb4d 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -392,7 +392,7 @@ // Panels // ------------------------- -.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border;) { +.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { border-color: @border; & > .panel-heading { -- cgit v1.2.3 From ea782486082251c5e28e974f5843b6c37147cf51 Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Thu, 28 Nov 2013 17:41:43 +0100 Subject: removed all caret border color settings. --- less/mixins.less | 3 --- 1 file changed, 3 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index dff49cb4d..a91977984 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -403,9 +403,6 @@ + .panel-collapse .panel-body { border-top-color: @border; } - & > .dropdown .caret { - border-color: @heading-text-color transparent; - } } & > .panel-footer { + .panel-collapse .panel-body { -- cgit v1.2.3 From 08e41d769a5fc34b60a307721dacc34eb36f1a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Fri, 29 Nov 2013 08:37:54 +0100 Subject: Add missing last column float --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index d5c63ee0c..f74d22b29 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -736,11 +736,11 @@ @item: ~".col-@{class}-@{index}"; .col(@index + 1, @item); } - .col(@index, @list) when (@index < @grid-columns) { // general + .col(@index, @list) when (@index =< @grid-columns) { // general @item: ~".col-@{class}-@{index}"; .col(@index + 1, ~"@{list}, @{item}"); } - .col(@index, @list) when (@index = @grid-columns) { // terminal + .col(@index, @list) when (@index > @grid-columns) { // terminal @{list} { float: left; } -- cgit v1.2.3 From 6bc09dd94949e05827c541795e4133b0cdbf7cae Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 30 Nov 2013 16:29:52 -0800 Subject: Fixes #11268: Account for badges within buttons by matching background to text color and text color to background --- less/mixins.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 51a4cc5a4..b587a69e5 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -489,6 +489,11 @@ border-color: @border; } } + + .badge { + color: @background; + background-color: #fff; + } } // Button sizes -- cgit v1.2.3 From ed29a99df4f9573a2f312093f3aaac9acf2b9c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sun, 1 Dec 2013 09:18:27 +0100 Subject: Use mixin instead of whole code --- less/mixins.less | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index df515f39a..479352452 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -88,11 +88,7 @@ } // New mixin to use as of v3.0.1 .text-hide() { - font: ~"0/0" a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; + .hide-text(); } -- cgit v1.2.3 From 303f8a33c354b5c8f6132574de55114b8f39a1f1 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 3 Dec 2013 13:57:28 -0800 Subject: add case to responsive-visibility mixin; see #10056 --- less/mixins.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 8da6b23ef..4f58d3060 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -560,9 +560,10 @@ // More easily include all the states for responsive-utilities.less. .responsive-visibility() { display: block !important; - tr& { display: table-row !important; } + table& { display: table; } + tr& { display: table-row !important; } th&, - td& { display: table-cell !important; } + td& { display: table-cell !important; } } .responsive-invisibility() { -- cgit v1.2.3 From 3f1e4b92eefaee617115973eba98fc7cc0905ab8 Mon Sep 17 00:00:00 2001 From: awebdeveloper Date: Tue, 19 Nov 2013 13:50:33 +0530 Subject: -moz and old webkit syntax removed for gradients based on http://caniuse.com/#search=grad --- less/mixins.less | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 8da6b23ef..3d0aa679e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -31,7 +31,7 @@ .tab-focus() { // Default outline: thin dotted; - //Webkit + // WebKit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } @@ -274,10 +274,8 @@ // 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; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { - 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-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down } @@ -287,47 +285,36 @@ // 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; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { - 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-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down } .directional(@start-color: #555; @end-color: #333; @deg: 45deg) { background-repeat: repeat-x; - 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 + background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ } .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { - 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(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback } .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { - 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(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback } .radial(@inner-color: #555; @outer-color: #333) { - 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: rgba(255,255,255,.15); @angle: 45deg) { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, @color), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, @color), color-stop(.75, @color), color-stop(.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); } } -- cgit v1.2.3 From 9ce7e5620c47b5ec205c42948c42fc468c05686f Mon Sep 17 00:00:00 2001 From: Bohdan Ganicky Date: Fri, 6 Dec 2013 14:09:55 +0100 Subject: Updated .scale() mixin so that it accepts optional vertical scale factor parameter. --- less/mixins.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 5c54c64c7..e0ff3f705 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -150,10 +150,10 @@ -ms-transform: rotate(@degrees); // IE9+ transform: rotate(@degrees); } -.scale(@ratio) { - -webkit-transform: scale(@ratio); - -ms-transform: scale(@ratio); // IE9+ - transform: scale(@ratio); +.scale(@ratio; @ratio-y...) { + -webkit-transform: scale(@ratio, @ratio-y); + -ms-transform: scale(@ratio, @ratio-y); // IE9+ + transform: scale(@ratio, @ratio-y); } .translate(@x; @y) { -webkit-transform: translate(@x, @y); -- cgit v1.2.3 From b92bee99efd95a4c0ae469e3a5f4004da0164578 Mon Sep 17 00:00:00 2001 From: Luke Noel-Storr Date: Fri, 6 Dec 2013 14:11:58 +0000 Subject: reverted changes in commit 96109d3 which seemed to break conditional classes in striped tables (ignoring the comment above that the previous rules were needed for just this purpose) fixes issue twbs/bootstrap#11728 --- less/mixins.less | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 5c54c64c7..a820ad686 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -414,24 +414,24 @@ .table-row-variant(@state; @background) { // Exact selectors below required to override `.table-striped` and prevent // inheritance to nested tables. - .table { - > thead, - > tbody, - > tfoot { - > tr > .@{state}, - > .@{state} > td, - > .@{state} > th { - background-color: @background; - } + .table > thead > tr, + .table > tbody > tr, + .table > tfoot > tr { + > td.@{state}, + > th.@{state}, + &.@{state} > td, + &.@{state} > th { + background-color: @background; } } // Hover states for `.table-hover` // Note: this is not available for cells or rows within `thead` or `tfoot`. - .table-hover > tbody { - > tr > .@{state}:hover, - > .@{state}:hover > td, - > .@{state}:hover > th { + .table-hover > tbody > tr { + > td.@{state}:hover, + > th.@{state}:hover, + &.@{state}:hover > td, + &.@{state}:hover > th { background-color: darken(@background, 5%); } } -- cgit v1.2.3 From 107b334d349be065421967553f57aa186736ffcf Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 11:45:11 -0800 Subject: Fixes #11766: Use color var for background on badges in buttons to restore proper background to default button badge --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 5c54c64c7..4d045987e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -475,7 +475,7 @@ .badge { color: @background; - background-color: #fff; + background-color: @color; } } -- cgit v1.2.3 From 07de53c644b315852c5f315ab91bfd6d65660d50 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 14:09:03 -0800 Subject: Contextual list group cleanup * Adds nav link to sidebar for contextual classes * Refactors to use prefixed classes, like .list-group-item-info, instead of chained classes * Adds default and linked variations to example in docs --- less/mixins.less | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 04bd10ee0..9c84984ba 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -450,16 +450,28 @@ // List Groups // ------------------------- -.list-group-item-variant(@state; @background; @border) { - .list-group-item.@{state} { +.list-group-item-variant(@state; @background; @color) { + .list-group-item-@{state} { + color: @color; background-color: @background; - border-color: @border; } + a.list-group-item-@{state} { + color: @color; - // Hover states - .list-group-item.@{state}:hover { - background-color: darken(@background, 5%); - border-color: darken(@border, 5%); + .list-group-item-heading { color: inherit; } + + &:hover, + &:focus { + color: @color; + background-color: darken(@background, 5%); + } + &.active, + &.active:hover, + &.active:focus { + color: #fff; + background-color: @color; + border-color: @color; + } } } -- cgit v1.2.3 From 0016c17f9307bc71fc96d8d4680a9c861f137cae Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 23:18:28 -0800 Subject: Switch to `&:extend(.clearfix all)` for clearfix mixin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original discussion: https://github.com/less/less.js/issues/1437#issuecomment-21383639. Since we’re switching to `grunt-contrib-less`, we can take advantage of newer LESS features than what RECESS supported. Included in that is the ability to `:extend`, and not only that, but `:extend(.mixin-name all)`. By doing so, we remove duplicate CSS for all our elements that were being clearfix-ed. Fixes #8947, #8968, #8991, #9257, #9268, #9291, #9430, #9604, #9686, #9929, #10731, #10793, #11305, #11498, #11533, #11570, #11604, #11652. (dem issues, tho) --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 9ef72fef7..1079b947a 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -597,14 +597,14 @@ margin-left: auto; padding-left: (@grid-gutter-width / 2); padding-right: (@grid-gutter-width / 2); - .clearfix(); + &:extend(.clearfix all); } // Creates a wrapper for a series of columns .make-row(@gutter: @grid-gutter-width) { margin-left: (@gutter / -2); margin-right: (@gutter / -2); - .clearfix(); + &:extend(.clearfix all); } // Generate the extra small columns -- cgit v1.2.3 From 9ceff600571b40acd7c02ae315a6f79da3b25d74 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 8 Dec 2013 23:34:24 -0800 Subject: more nesting in .list-group-item-variant mixin --- less/mixins.less | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 9ef72fef7..59c4c9573 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -443,23 +443,24 @@ .list-group-item-@{state} { color: @color; background-color: @background; - } - a.list-group-item-@{state} { - color: @color; - - .list-group-item-heading { color: inherit; } - &:hover, - &:focus { + a& { color: @color; - background-color: darken(@background, 5%); - } - &.active, - &.active:hover, - &.active:focus { - color: #fff; - background-color: @color; - border-color: @color; + + .list-group-item-heading { color: inherit; } + + &:hover, + &:focus { + color: @color; + background-color: darken(@background, 5%); + } + &.active, + &.active:hover, + &.active:focus { + color: #fff; + background-color: @color; + border-color: @color; + } } } } -- cgit v1.2.3 From 9664f8da58abe718463ee31398e5d15de37f7289 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 9 Dec 2013 15:59:50 -0800 Subject: add parens around arithmetic in recursive mixin calls to comply with LESS strictMath <3 @seven-phases-max for helping to confirm & debug this X-Ref: https://github.com/less/less.js/issues/1725 --- less/mixins.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index c107b566e..b5beaddf2 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -729,11 +729,11 @@ // Common styles for all sizes of grid columns, widths 1-12 .col(@index) when (@index = 1) { // initial @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; - .col(@index + 1, @item); + .col((@index + 1), @item); } .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; - .col(@index + 1, ~"@{list}, @{item}"); + .col((@index + 1), ~"@{list}, @{item}"); } .col(@index, @list) when (@index > @grid-columns) { // terminal @{list} { @@ -751,11 +751,11 @@ .make-grid-columns-float(@class) { .col(@index) when (@index = 1) { // initial @item: ~".col-@{class}-@{index}"; - .col(@index + 1, @item); + .col((@index + 1), @item); } .col(@index, @list) when (@index =< @grid-columns) { // general @item: ~".col-@{class}-@{index}"; - .col(@index + 1, ~"@{list}, @{item}"); + .col((@index + 1), ~"@{list}, @{item}"); } .col(@index, @list) when (@index > @grid-columns) { // terminal @{list} { @@ -790,7 +790,7 @@ .make-grid(@index, @class, @type) when (@index >= 0) { .calc-grid(@index, @class, @type); // next iteration - .make-grid(@index - 1, @class, @type); + .make-grid((@index - 1), @class, @type); } -- cgit v1.2.3 From 3e0366a3df12840cd086ff632e1455aae5c5ee65 Mon Sep 17 00:00:00 2001 From: Jan Panschab Date: Tue, 10 Dec 2013 17:15:41 +0100 Subject: transform origin mixin for explorer --- less/mixins.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index b5beaddf2..786c53437 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -193,6 +193,7 @@ .transform-origin(@origin) { -webkit-transform-origin: @origin; -moz-transform-origin: @origin; + -ms-transform-origin: @origin; transform-origin: @origin; } -- cgit v1.2.3 From 5f9ecc7351df9bc45117ffe7c8ab51d3571ef878 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 12 Dec 2013 23:01:11 -0800 Subject: -ms-transform is for IE9 only, IE10+ don't require it --- less/mixins.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index 786c53437..4bfd44904 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -147,17 +147,17 @@ // Transformations .rotate(@degrees) { -webkit-transform: rotate(@degrees); - -ms-transform: rotate(@degrees); // IE9+ + -ms-transform: rotate(@degrees); // IE9 only transform: rotate(@degrees); } .scale(@ratio; @ratio-y...) { -webkit-transform: scale(@ratio, @ratio-y); - -ms-transform: scale(@ratio, @ratio-y); // IE9+ + -ms-transform: scale(@ratio, @ratio-y); // IE9 only transform: scale(@ratio, @ratio-y); } .translate(@x; @y) { -webkit-transform: translate(@x, @y); - -ms-transform: translate(@x, @y); // IE9+ + -ms-transform: translate(@x, @y); // IE9 only transform: translate(@x, @y); } .skew(@x; @y) { @@ -172,12 +172,12 @@ .rotateX(@degrees) { -webkit-transform: rotateX(@degrees); - -ms-transform: rotateX(@degrees); // IE9+ + -ms-transform: rotateX(@degrees); // IE9 only transform: rotateX(@degrees); } .rotateY(@degrees) { -webkit-transform: rotateY(@degrees); - -ms-transform: rotateY(@degrees); // IE9+ + -ms-transform: rotateY(@degrees); // IE9 only transform: rotateY(@degrees); } .perspective(@perspective) { @@ -193,7 +193,7 @@ .transform-origin(@origin) { -webkit-transform-origin: @origin; -moz-transform-origin: @origin; - -ms-transform-origin: @origin; + -ms-transform-origin: @origin; // IE9 only transform-origin: @origin; } -- cgit v1.2.3 From e3d799fca3f64211c74c13b4ea85ad6a33d693b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Fri, 13 Dec 2013 23:15:02 +0100 Subject: ';' isn't needed --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/mixins.less') diff --git a/less/mixins.less b/less/mixins.less index b5beaddf2..1a2a97ae4 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -353,7 +353,7 @@ // // Keep images from scaling beyond the width of their parents. -.img-responsive(@display: block;) { +.img-responsive(@display: block) { display: @display; max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching -- cgit v1.2.3