From 80e86442308b2cc86ba948de87e854057933e3ab Mon Sep 17 00:00:00 2001 From: Martynas Date: Sat, 5 Oct 2013 13:55:26 +0300 Subject: removed outline from modal --- less/modals.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 4f2cf9468..8f727308a 100644 --- a/less/modals.less +++ b/less/modals.less @@ -30,6 +30,7 @@ right: 0; bottom: 0; left: 0; + outline: 0; z-index: @zindex-modal-background; // When fading in the modal, animate it to slide down -- cgit v1.2.3 From 160ed8561672c4d59eff839d3e8bacd8ff1fb100 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Tue, 15 Oct 2013 20:53:56 +0200 Subject: Customizable backdrop opacity --- less/modals.less | 2 +- less/variables.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 776073d57..8adfd3ad2 100644 --- a/less/modals.less +++ b/less/modals.less @@ -65,7 +65,7 @@ background-color: @modal-backdrop-bg; // Fade for backdrop &.fade { .opacity(0); } - &.in { .opacity(.5); } + &.in { .opacity(@modal-backdrop-opacity); } } // Modal header diff --git a/less/variables.less b/less/variables.less index e596215d0..0e58b3195 100644 --- a/less/variables.less +++ b/less/variables.less @@ -445,6 +445,7 @@ @modal-content-fallback-border-color: #999; @modal-backdrop-bg: #000; +@modal-backdrop-opacity: .5; @modal-header-border-color: #e5e5e5; @modal-footer-border-color: @modal-header-border-color; -- 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/list-group.less | 5 +++++ less/mixins.less | 15 +++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'less') diff --git a/less/list-group.less b/less/list-group.less index 2cee52973..cf4ce3eea 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -41,6 +41,11 @@ } } +// Contextual variants +.list-group-item-variant(success; @state-success-bg; @state-success-border); +.list-group-item-variant(danger; @state-danger-bg; @state-danger-border); +.list-group-item-variant(warning; @state-warning-bg; @state-warning-border); + // Linked list items a.list-group-item { color: @list-group-link-color; 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') 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 77bb7502bc7112f915b32940c1fe5d8555230c30 Mon Sep 17 00:00:00 2001 From: LFeh Date: Fri, 18 Oct 2013 10:05:50 -0300 Subject: Options of sizes added in modal --- less/modals.less | 8 ++++++++ less/variables.less | 3 +++ 2 files changed, 11 insertions(+) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 776073d57..c44b76094 100644 --- a/less/modals.less +++ b/less/modals.less @@ -123,6 +123,14 @@ width: 600px; padding-top: 30px; padding-bottom: 30px; + // Define large size for the modal + &.modal-lg{ + width: @modal-lg; + } + // Define small size for the modal + &.modal-sm{ + width: @modal-sm; + } } .modal-content { .box-shadow(0 5px 15px rgba(0,0,0,.5)); diff --git a/less/variables.less b/less/variables.less index e596215d0..5fb66b225 100644 --- a/less/variables.less +++ b/less/variables.less @@ -448,6 +448,9 @@ @modal-header-border-color: #e5e5e5; @modal-footer-border-color: @modal-header-border-color; +@modal-lg: 900px; +@modal-sm: 400px; + // Alerts // ------------------------- -- cgit v1.2.3 From 89e0f1669f2b4166051affa4eec819475660ed72 Mon Sep 17 00:00:00 2001 From: LFeh Date: Mon, 21 Oct 2013 16:39:31 -0200 Subject: Adjust in modal size rules --- less/modals.less | 17 ++++++++--------- less/variables.less | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index c44b76094..accd4a948 100644 --- a/less/modals.less +++ b/less/modals.less @@ -38,7 +38,14 @@ margin-right: auto; width: auto; padding: 10px; - z-index: (@zindex-modal-background + 10); + z-index: (@zindex-modal-background + 10); + + &.modal-lg { + width: @modal-lg; + } + &.modal-sm { + width: @modal-sm; + } } // Actual modal @@ -123,14 +130,6 @@ width: 600px; padding-top: 30px; padding-bottom: 30px; - // Define large size for the modal - &.modal-lg{ - width: @modal-lg; - } - // Define small size for the modal - &.modal-sm{ - width: @modal-sm; - } } .modal-content { .box-shadow(0 5px 15px rgba(0,0,0,.5)); diff --git a/less/variables.less b/less/variables.less index 5fb66b225..44b49a43d 100644 --- a/less/variables.less +++ b/less/variables.less @@ -449,7 +449,7 @@ @modal-footer-border-color: @modal-header-border-color; @modal-lg: 900px; -@modal-sm: 400px; +@modal-sm: 300px; // Alerts -- cgit v1.2.3 From b8f9f82d182d8300246ba9c4e75a5db6e77f62d3 Mon Sep 17 00:00:00 2001 From: Bas Bosman Date: Wed, 30 Oct 2013 14:10:16 +0100 Subject: Add well-border variable Add a variable to allow the well border color to be specified. The reason I'd like to see this included is that my companies styleguide requires an explicit border color on well-like constructs. This variable allows me to easily override the default to use that color. --- less/variables.less | 1 + less/wells.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index e596215d0..758116763 100644 --- a/less/variables.less +++ b/less/variables.less @@ -545,6 +545,7 @@ // Wells // ------------------------- @well-bg: #f5f5f5; +@well-border: darken(@well-bg, 7%); // Badges diff --git a/less/wells.less b/less/wells.less index 865abc2eb..15d072b0c 100644 --- a/less/wells.less +++ b/less/wells.less @@ -9,7 +9,7 @@ padding: 19px; margin-bottom: 20px; background-color: @well-bg; - border: 1px solid darken(@well-bg, 7%); + border: 1px solid @well-border; border-radius: @border-radius-base; .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); blockquote { -- cgit v1.2.3 From aad447e29075b52a46931be17a9be4016cc89ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 7 Nov 2013 20:58:17 +0100 Subject: Fix #11400 and #11431 --- less/input-groups.less | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'less') diff --git a/less/input-groups.less b/less/input-groups.less index 8516a79e9..a70decc58 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -121,16 +121,26 @@ &:last-child > .btn { margin-left: -1px; } -} -.input-group-btn > .btn { - position: relative; - // Jankily prevent input button groups from wrapping - + .btn { - margin-left: -4px; - } - // Bring the "active" button to the front - &:hover, - &:active { - z-index: 2; + + > .btn { + position: relative; + + &:not(:first-of-type):not(:last-of-type) { + border-radius: 0; + } + + // Jankily prevent input button groups from wrapping + + .btn { + margin-left: -4px; + } + + .btn:last-of-type { + margin-left: -5px; + } + + // Bring the "active" button to the front + &:hover, + &:active { + z-index: 2; + } } } -- cgit v1.2.3 From 2b56ff04614c4617355d16c14784654e841bcf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 31 Oct 2013 10:32:23 +0100 Subject: Reduce size of the visibility styles --- less/responsive-utilities.less | 138 +++-------------------------------------- 1 file changed, 9 insertions(+), 129 deletions(-) (limited to 'less') diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index df53e479d..5d093dd1a 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -23,172 +23,51 @@ // Visibility utilities - .visible-xs { .responsive-invisibility(); + @media (max-width: @screen-xs-max) { .responsive-visibility(); } - &.visible-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-visibility(); - } - } - &.visible-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-visibility(); - } - } - &.visible-lg { - @media (min-width: @screen-lg-min) { - .responsive-visibility(); - } - } } .visible-sm { .responsive-invisibility(); - &.visible-xs { - @media (max-width: @screen-xs-max) { - .responsive-visibility(); - } - } + @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { .responsive-visibility(); } - &.visible-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-visibility(); - } - } - &.visible-lg { - @media (min-width: @screen-lg-min) { - .responsive-visibility(); - } - } } .visible-md { .responsive-invisibility(); - &.visible-xs { - @media (max-width: @screen-xs-max) { - .responsive-visibility(); - } - } - &.visible-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-visibility(); - } - } + @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { .responsive-visibility(); } - &.visible-lg { - @media (min-width: @screen-lg-min) { - .responsive-visibility(); - } - } } .visible-lg { .responsive-invisibility(); - &.visible-xs { - @media (max-width: @screen-xs-max) { - .responsive-visibility(); - } - } - &.visible-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-visibility(); - } - } - &.visible-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-visibility(); - } - } + @media (min-width: @screen-lg-min) { .responsive-visibility(); } } .hidden-xs { - .responsive-visibility(); @media (max-width: @screen-xs-max) { .responsive-invisibility(); } - &.hidden-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-invisibility(); - } - } - &.hidden-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-invisibility(); - } - } - &.hidden-lg { - @media (min-width: @screen-lg-min) { - .responsive-invisibility(); - } - } } .hidden-sm { - .responsive-visibility(); - &.hidden-xs { - @media (max-width: @screen-xs-max) { - .responsive-invisibility(); - } - } @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { .responsive-invisibility(); } - &.hidden-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-invisibility(); - } - } - &.hidden-lg { - @media (min-width: @screen-lg-min) { - .responsive-invisibility(); - } - } } .hidden-md { - .responsive-visibility(); - &.hidden-xs { - @media (max-width: @screen-xs-max) { - .responsive-invisibility(); - } - } - &.hidden-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-invisibility(); - } - } @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { .responsive-invisibility(); } - &.hidden-lg { - @media (min-width: @screen-lg-min) { - .responsive-invisibility(); - } - } } .hidden-lg { - .responsive-visibility(); - &.hidden-xs { - @media (max-width: @screen-xs-max) { - .responsive-invisibility(); - } - } - &.hidden-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-invisibility(); - } - } - &.hidden-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-invisibility(); - } - } @media (min-width: @screen-lg-min) { .responsive-invisibility(); } @@ -197,13 +76,14 @@ // Print utilities .visible-print { .responsive-invisibility(); -} -@media print { - .visible-print { + @media print { .responsive-visibility(); } - .hidden-print { +} + +.hidden-print { + @media print { .responsive-invisibility(); } } -- cgit v1.2.3 From 3a65b2c11f43154907923535b56ea84fb84cfb78 Mon Sep 17 00:00:00 2001 From: Haley Date: Mon, 2 Dec 2013 13:29:54 -0600 Subject: Added text-justify class to type.less --- less/type.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/type.less b/less/type.less index ac07ac7ce..0c9600d50 100644 --- a/less/type.less +++ b/less/type.less @@ -120,6 +120,7 @@ cite { font-style: normal; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } +.text-justify { text-align: justify; } // Page header -- cgit v1.2.3 From 92a624a31ced5ef0e70052a00253f5edc70a104b Mon Sep 17 00:00:00 2001 From: Lipis Date: Tue, 3 Dec 2013 15:03:07 +0100 Subject: Get rid of empty line before the last closing bracket --- less/buttons.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index a0909606f..ee6f6612a 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -45,7 +45,6 @@ .opacity(.65); .box-shadow(none); } - } -- cgit v1.2.3 From 199872418c1d0aac6e79218cfb86ba2b751e571e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 3 Dec 2013 11:14:13 -0800 Subject: reference root issue in explanatory comment --- 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 9c5eeed4e..7188703e5 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -178,7 +178,7 @@ padding: 9px 10px; .navbar-vertical-align(34px); background-color: transparent; - background-image: none; // Fix for at least Firefox on Android, per #11468 + background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid transparent; border-radius: @border-radius-base; -- 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') 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') 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 4a45650026a16d372feb1f150899e883d410a35e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 3 Dec 2013 18:03:04 -0800 Subject: fix .btn-group-xs portion of #10979 --- less/buttons.less | 5 ++--- less/variables.less | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index ee6f6612a..0a484ead2 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -122,13 +122,12 @@ // line-height: ensure even-numbered height of button next to large input .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); } -.btn-sm, -.btn-xs { +.btn-sm { // line-height: ensure proper height of button next to small input .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } .btn-xs { - padding: 1px 5px; + .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); } diff --git a/less/variables.less b/less/variables.less index 120a65e06..1775be080 100644 --- a/less/variables.less +++ b/less/variables.less @@ -84,6 +84,9 @@ @padding-small-vertical: 5px; @padding-small-horizontal: 10px; +@padding-xs-vertical: 1px; +@padding-xs-horizontal: 5px; + @line-height-large: 1.33; @line-height-small: 1.5; -- cgit v1.2.3 From a45d83987466e61fd613ac9e7f98fafa8697d16f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 4 Dec 2013 21:13:33 -0800 Subject: Fixes #11712: Better support for .table-responsive within .panel's --- less/panels.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'less') diff --git a/less/panels.less b/less/panels.less index d782ffcde..a5ada2a2d 100644 --- a/less/panels.less +++ b/less/panels.less @@ -91,6 +91,10 @@ } } } + > .table-responsive { + border: 0; + margin-bottom: 0; + } } -- cgit v1.2.3 From 45930acdf7b7d03842011b1d20779f1762e99c30 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 4 Dec 2013 22:32:56 -0800 Subject: Fixes #11610: Add @grid-float-breakpoint-max to better link navbar behavior across viewports and improve customization. Also addresses #10371, #10395, and #10465. --- less/navbar.less | 8 ++++---- less/variables.less | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 7188703e5..ea284fede 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -213,7 +213,7 @@ line-height: @line-height-computed; } - @media (max-width: @screen-xs-max) { + @media (max-width: @grid-float-breakpoint-max) { // Dropdowns get custom display when collapsed .open .dropdown-menu { position: static; @@ -287,7 +287,7 @@ .form-inline(); .form-group { - @media (max-width: @screen-xs-max) { + @media (max-width: @grid-float-breakpoint-max) { margin-bottom: 5px; } } @@ -445,7 +445,7 @@ } } - @media (max-width: @screen-xs-max) { + @media (max-width: @grid-float-breakpoint-max) { // Dropdowns get custom display when collapsed .open .dropdown-menu { > li > a { @@ -565,7 +565,7 @@ } } - @media (max-width: @screen-xs-max) { + @media (max-width: @grid-float-breakpoint-max) { // Dropdowns get custom display .open .dropdown-menu { > .dropdown-header { diff --git a/less/variables.less b/less/variables.less index 1775be080..8b5f2184d 100644 --- a/less/variables.less +++ b/less/variables.less @@ -247,8 +247,13 @@ @grid-columns: 12; // Padding, to be divided by two and applied to the left and right of all columns @grid-gutter-width: 30px; -// Point at which the navbar stops collapsing + +// Navbar collapse + +// Point at which the navbar becomes uncollapsed @grid-float-breakpoint: @screen-sm-min; +// Point at which the navbar begins collapsing +@grid-float-breakpoint-max: (@grid-float-breakpoint - 1); // Navbar -- cgit v1.2.3 From 01afe84b316d22374ad2333b3c15b35ad17029af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 5 Dec 2013 07:43:50 +0100 Subject: Remove redundant, duplicate comment --- less/buttons.less | 1 - 1 file changed, 1 deletion(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index ee6f6612a..d1ac7d7c7 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -6,7 +6,6 @@ // Base styles // -------------------------------------------------- -// Core styles .btn { display: inline-block; margin-bottom: 0; // For input.btn -- 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') 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') 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 78b43d4c99c5b091980a977656a378f6c46c7c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Fri, 6 Dec 2013 22:34:29 +0100 Subject: Darken icon bar to meet WCAG --- less/variables.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index 8b5f2184d..5b2e9044f 100644 --- a/less/variables.less +++ b/less/variables.less @@ -286,7 +286,7 @@ // Navbar toggle @navbar-default-toggle-hover-bg: #ddd; -@navbar-default-toggle-icon-bar-bg: #ccc; +@navbar-default-toggle-icon-bar-bg: #888; @navbar-default-toggle-border-color: #ddd; -- cgit v1.2.3 From f4087df47e6347a2f28b44a18914cfebf1cc3a9c Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:42:21 +0200 Subject: Remove incompatible properties. --- less/forms.less | 4 ---- 1 file changed, 4 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index dc425ecc1..81840d158 100644 --- a/less/forms.less +++ b/less/forms.less @@ -89,7 +89,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; } @@ -123,7 +122,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; background-color: @input-bg; background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid @input-border; @@ -179,10 +177,8 @@ output { margin-top: 10px; margin-bottom: 10px; padding-left: 20px; - vertical-align: middle; label { display: inline; - margin-bottom: 0; font-weight: normal; cursor: pointer; } -- 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') 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 c07632e4e8398f55d796d00b520ca43df38dbf29 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 11:47:37 -0800 Subject: Reorder button and table variants for consistent order --- less/buttons.less | 8 ++++---- less/tables.less | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/buttons.less b/less/buttons.less index 62e693bee..b728f332c 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -56,6 +56,10 @@ .btn-primary { .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); } +// Success appears as green +.btn-success { + .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); +} // Warning appears as orange .btn-warning { .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); @@ -64,10 +68,6 @@ .btn-danger { .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); } -// Success appears as green -.btn-success { - .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); -} // Info appears as blue-green .btn-info { .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); diff --git a/less/tables.less b/less/tables.less index ca565f4b7..5827b6083 100644 --- a/less/tables.less +++ b/less/tables.less @@ -156,8 +156,8 @@ table { // Generate the contextual variants .table-row-variant(active; @table-bg-active); .table-row-variant(success; @state-success-bg); -.table-row-variant(danger; @state-danger-bg); .table-row-variant(warning; @state-warning-bg); +.table-row-variant(danger; @state-danger-bg); // Responsive tables -- cgit v1.2.3 From fe58357df182b52f5905f432a3b2629c717656f1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 11:56:35 -0800 Subject: Fixes #10884: Adds .info variant to contextual table classes --- less/tables.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index 5827b6083..f8c05fecf 100644 --- a/less/tables.less +++ b/less/tables.less @@ -158,6 +158,7 @@ table { .table-row-variant(success; @state-success-bg); .table-row-variant(warning; @state-warning-bg); .table-row-variant(danger; @state-danger-bg); +.table-row-variant(info; @state-info-bg); // Responsive tables -- cgit v1.2.3 From b1215d1b2ecd6cd3898af19ce43cc647e2ec854a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 12:18:13 -0800 Subject: Fixes #11193: Add kbd element styles to indicate user input via keyboard --- less/code.less | 10 ++++++++++ less/variables.less | 3 +++ 2 files changed, 13 insertions(+) (limited to 'less') diff --git a/less/code.less b/less/code.less index 44e9e8937..3eed26c05 100644 --- a/less/code.less +++ b/less/code.less @@ -21,6 +21,16 @@ code { border-radius: @border-radius-base; } +// User input typically entered via keyboard +kbd { + padding: 2px 4px; + font-size: 90%; + color: @kbd-color; + background-color: @kbd-bg; + border-radius: @border-radius-small; + box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); +} + // Blocks of code pre { display: block; diff --git a/less/variables.less b/less/variables.less index 5b2e9044f..3681e99b5 100644 --- a/less/variables.less +++ b/less/variables.less @@ -602,6 +602,9 @@ @code-color: #c7254e; @code-bg: #f9f2f4; +@kbd-color: #fff; +@kbd-bg: #333; + @pre-bg: #f5f5f5; @pre-color: @gray-dark; @pre-border-color: #ccc; -- 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/list-group.less | 29 +++++++++++++++++++++++------ less/mixins.less | 26 +++++++++++++++++++------- 2 files changed, 42 insertions(+), 13 deletions(-) (limited to 'less') diff --git a/less/list-group.less b/less/list-group.less index cf4ce3eea..35fff05d4 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -2,17 +2,21 @@ // List groups // -------------------------------------------------- + // Base class // // Easily usable on
    ,
      , or
      . + .list-group { // No need to set list-style: none; since .list-group-item is block level margin-bottom: 20px; padding-left: 0; // reset padding because ul and ol } + // Individual list items -// ------------------------- +// +// Use on `li`s or `div`s within the `.list-group` parent. .list-group-item { position: relative; @@ -41,12 +45,12 @@ } } -// Contextual variants -.list-group-item-variant(success; @state-success-bg; @state-success-border); -.list-group-item-variant(danger; @state-danger-bg; @state-danger-border); -.list-group-item-variant(warning; @state-warning-bg; @state-warning-border); // Linked list items +// +// Use anchor elements instead of `li`s or `div`s to create linked list items. +// Includes an extra `.active` modifier class for showing selected items. + a.list-group-item { color: @list-group-link-color; @@ -80,8 +84,21 @@ a.list-group-item { } } + +// Contextual variants +// +// Add modifier classes to change text and background color on individual items. +// Organizationally, this must come after the `:hover` states. + +.list-group-item-variant(success; @state-success-bg; @state-success-text); +.list-group-item-variant(warning; @state-warning-bg; @state-warning-text); +.list-group-item-variant(danger; @state-danger-bg; @state-danger-text); +.list-group-item-variant(info; @state-info-bg; @state-info-text); + + // Custom content options -// ------------------------- +// +// Extra classes for creating well-formatted content within `.list-group-item`s. .list-group-item-heading { margin-top: 0; 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 6273604601c58284f49b38ae4e52533b9689437c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 7 Dec 2013 20:52:51 -0800 Subject: Add .container-fluid variation for full-width containers and layouts /cc #10711 #9862 --- less/grid.less | 27 ++++++++++++++++++++++++--- less/navbar.less | 22 +++++++++++++--------- 2 files changed, 37 insertions(+), 12 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index 279d80368..dfae6999b 100644 --- a/less/grid.less +++ b/less/grid.less @@ -2,7 +2,11 @@ // Grid system // -------------------------------------------------- -// Set the container width, and override it for fixed navbars in media queries + +// Container widths +// +// Set the container width, and override it for fixed navbars in media queries. + .container { .container-fixed(); @@ -17,12 +21,30 @@ } } -// mobile first defaults + +// Fluid container +// +// Utilizes the mixin meant for fixed width containers, but without any defined +// width for fluid, full width layouts. + +.container-fluid { + .container-fixed(); +} + + +// Row +// +// Rows contain and clear the floats of your columns. + .row { .make-row(); } + +// Columns +// // Common styles for small and large grid columns + .make-grid-columns(); @@ -76,4 +98,3 @@ .make-grid(@grid-columns, lg, push); .make-grid(@grid-columns, lg, offset); } - diff --git a/less/navbar.less b/less/navbar.less index ea284fede..e9633d855 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -93,14 +93,17 @@ // // When a container is present, change the behavior of the header and collapse. -.container > .navbar-header, -.container > .navbar-collapse { - margin-right: -@navbar-padding-horizontal; - margin-left: -@navbar-padding-horizontal; - - @media (min-width: @grid-float-breakpoint) { - margin-right: 0; - margin-left: 0; +.container, +.container-fluid { + > .navbar-header, + > .navbar-collapse { + margin-right: -@navbar-padding-horizontal; + margin-left: -@navbar-padding-horizontal; + + @media (min-width: @grid-float-breakpoint) { + margin-right: 0; + margin-left: 0; + } } } @@ -159,7 +162,8 @@ } @media (min-width: @grid-float-breakpoint) { - .navbar > .container & { + .navbar > .container &, + .navbar > .container-fluid & { margin-left: -@navbar-padding-horizontal; } } -- cgit v1.2.3 From b5008ebf9ca1c9c90a6ec73ae12e55a8f155017f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 01:59:44 -0800 Subject: add vertical-align back to where it's necessary since we reset from block to inline-block on several inputs --- less/forms.less | 2 ++ 1 file changed, 2 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 81840d158..50df399e3 100644 --- a/less/forms.less +++ b/less/forms.less @@ -303,6 +303,7 @@ input[type="checkbox"], // In navbar-form, allow folks to *not* use `.form-group` .form-control { display: inline-block; + vertical-align: middle; } // Override `width: 100%;` when not within a `.form-group` @@ -319,6 +320,7 @@ input[type="checkbox"], margin-top: 0; margin-bottom: 0; padding-left: 0; + vertical-align: middle; } .radio input[type="radio"], .checkbox input[type="checkbox"] { -- cgit v1.2.3 From 1f9bfa89dc219654b5e096bda9233a58c69216fa Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 02:14:24 -0800 Subject: Fixes #11741: Don't set headings font-family again, just use inherit --- less/variables.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index 3681e99b5..fea7bc75a 100644 --- a/less/variables.less +++ b/less/variables.less @@ -58,7 +58,7 @@ @line-height-base: 1.428571429; // 20/14 @line-height-computed: floor(@font-size-base * @line-height-base); // ~20px -@headings-font-family: @font-family-base; +@headings-font-family: inherit; @headings-font-weight: 500; @headings-line-height: 1.1; @headings-color: inherit; -- cgit v1.2.3 From 77bc82d486d8c3cf58bd1ba48d57fcfa87509837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Fri, 1 Nov 2013 21:25:23 +0100 Subject: Add `.animation-*()` mixins --- less/mixins.less | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 4718cb2c0..e00e838ea 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -204,6 +204,30 @@ -webkit-animation: @animation; animation: @animation; } +.animation-name(@name) { + -webkit-animation-name: @name; + animation-name: @name; +} +.animation-duration(@duration) { + -webkit-animation-duration: @duration; + animation-duration: @duration; +} +.animation-timing-function(@timing-function) { + -webkit-animation-timing-function: @timing-function; + animation-timing-function: @timing-function; +} +.animation-delay(@delay) { + -webkit-animation-delay: @delay; + animation-delay: @delay; +} +.animation-iteration-count(@iteration-count) { + -webkit-animation-iteration-count: @iteration-count; + animation-iteration-count: @iteration-count; +} +.animation-direction(@direction) { + -webkit-animation-direction: @direction; + animation-direction: @direction; +} // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. -- cgit v1.2.3 From 6df909ad9b85e5e19ff7760da8981bf7563a5bb9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 19:19:06 -0800 Subject: Fixes #11786: Nest media queries within print utilities for mixin-friendliness --- less/responsive-utilities.less | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index df53e479d..5823c8fca 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -194,16 +194,21 @@ } } + // Print utilities +// +// Media queries are placed on the inside to be mixin-friendly. + .visible-print { .responsive-invisibility(); -} -@media print { - .visible-print { + @media print { .responsive-visibility(); } - .hidden-print { +} + +.hidden-print { + @media print { .responsive-invisibility(); } } -- 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/button-groups.less | 4 ++-- less/mixins.less | 4 ++-- less/modals.less | 2 +- less/navbar.less | 6 +++--- less/navs.less | 2 +- less/pager.less | 2 +- less/panels.less | 2 +- less/type.less | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index 05fda149a..ef9c34e77 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -37,7 +37,7 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { - .clearfix(); + &:extend(.clearfix all); .btn-group { float: left; @@ -157,7 +157,7 @@ // Clear floats so dropdown menus can be properly placed > .btn-group { - .clearfix(); + &:extend(.clearfix all); > .btn { float: none; } 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 diff --git a/less/modals.less b/less/modals.less index e65dbf7f1..292b5bd9c 100644 --- a/less/modals.less +++ b/less/modals.less @@ -98,7 +98,7 @@ padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding; text-align: right; // right align buttons border-top: 1px solid @modal-footer-border-color; - .clearfix(); // clear it in case folks use .pull-* classes on buttons + &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons // Properly space out buttons .btn + .btn { diff --git a/less/navbar.less b/less/navbar.less index e9633d855..51e3df258 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -15,7 +15,7 @@ border: 1px solid transparent; // Prevent floats from breaking the navbar - .clearfix(); + &:extend(.clearfix all); @media (min-width: @grid-float-breakpoint) { border-radius: @navbar-border-radius; @@ -29,7 +29,7 @@ // styling of responsive aspects. .navbar-header { - .clearfix(); + &:extend(.clearfix all); @media (min-width: @grid-float-breakpoint) { float: left; @@ -54,7 +54,7 @@ padding-left: @navbar-padding-horizontal; border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.1); - .clearfix(); + &:extend(.clearfix all); -webkit-overflow-scrolling: touch; &.in { diff --git a/less/navs.less b/less/navs.less index 859d5d866..e4ac14459 100644 --- a/less/navs.less +++ b/less/navs.less @@ -10,7 +10,7 @@ margin-bottom: 0; padding-left: 0; // Override default ul/ol list-style: none; - .clearfix(); + &:extend(.clearfix all); > li { position: relative; diff --git a/less/pager.less b/less/pager.less index 16993ddc8..5205f0ee5 100644 --- a/less/pager.less +++ b/less/pager.less @@ -8,7 +8,7 @@ margin: @line-height-computed 0; list-style: none; text-align: center; - .clearfix(); + &:extend(.clearfix all); li { display: inline; > a, diff --git a/less/panels.less b/less/panels.less index a5ada2a2d..37ab67043 100644 --- a/less/panels.less +++ b/less/panels.less @@ -15,7 +15,7 @@ // Panel contents .panel-body { padding: 15px; - .clearfix(); + &:extend(.clearfix all); } diff --git a/less/type.less b/less/type.less index 0c9600d50..1eddb3f9b 100644 --- a/less/type.less +++ b/less/type.less @@ -202,7 +202,7 @@ dd { } dd { margin-left: @component-offset-horizontal; - .clearfix(); // Clear the floated `dt` if an empty `dd` is present + &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present } } } -- 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') 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 10e74a94e6cb512f9c2d592aaf46252d95e7d498 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 9 Dec 2013 15:35:13 -0800 Subject: improve compliance with LESS's strictMath --- less/type.less | 2 +- less/variables.less | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 1eddb3f9b..24a581fe8 100644 --- a/less/type.less +++ b/less/type.less @@ -61,7 +61,7 @@ p { .lead { margin-bottom: @line-height-computed; - font-size: floor(@font-size-base * 1.15); + font-size: floor((@font-size-base * 1.15)); font-weight: 200; line-height: 1.4; diff --git a/less/variables.less b/less/variables.less index fea7bc75a..b9b0d4f4e 100644 --- a/less/variables.less +++ b/less/variables.less @@ -45,18 +45,18 @@ @font-family-base: @font-family-sans-serif; @font-size-base: 14px; -@font-size-large: ceil(@font-size-base * 1.25); // ~18px -@font-size-small: ceil(@font-size-base * 0.85); // ~12px +@font-size-large: ceil((@font-size-base * 1.25)); // ~18px +@font-size-small: ceil((@font-size-base * 0.85)); // ~12px -@font-size-h1: floor(@font-size-base * 2.6); // ~36px -@font-size-h2: floor(@font-size-base * 2.15); // ~30px -@font-size-h3: ceil(@font-size-base * 1.7); // ~24px -@font-size-h4: ceil(@font-size-base * 1.25); // ~18px +@font-size-h1: floor((@font-size-base * 2.6)); // ~36px +@font-size-h2: floor((@font-size-base * 2.15)); // ~30px +@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px +@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px @font-size-h5: @font-size-base; -@font-size-h6: ceil(@font-size-base * 0.85); // ~12px +@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px @line-height-base: 1.428571429; // 20/14 -@line-height-computed: floor(@font-size-base * @line-height-base); // ~20px +@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px @headings-font-family: inherit; @headings-font-weight: 500; @@ -263,7 +263,7 @@ @navbar-height: 50px; @navbar-margin-bottom: @line-height-computed; @navbar-border-radius: @border-radius-base; -@navbar-padding-horizontal: floor(@grid-gutter-width / 2); +@navbar-padding-horizontal: floor((@grid-gutter-width / 2)); @navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); @navbar-default-color: #777; @@ -374,7 +374,7 @@ @jumbotron-color: inherit; @jumbotron-bg: @gray-lighter; @jumbotron-heading-color: inherit; -@jumbotron-font-size: ceil(@font-size-base * 1.5); +@jumbotron-font-size: ceil((@font-size-base * 1.5)); // Form states and alerts -- 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') 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 ab29b1a3352e89fe8756a34e49a38341edd06844 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 9 Dec 2013 16:12:41 -0800 Subject: misc strictMath compliance fixes --- less/dropdowns.less | 2 +- less/forms.less | 2 +- less/panels.less | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 1a8f1973f..4bdc223fc 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -142,7 +142,7 @@ right: 0; bottom: 0; top: 0; - z-index: @zindex-dropdown - 10; + z-index: (@zindex-dropdown - 10); } // Right aligned dropdowns diff --git a/less/forms.less b/less/forms.less index 50df399e3..f7fc5d66c 100644 --- a/less/forms.less +++ b/less/forms.less @@ -352,7 +352,7 @@ input[type="checkbox"], // and other content below items .radio, .checkbox { - min-height: @line-height-computed + (@padding-base-vertical + 1); + min-height: (@line-height-computed + (@padding-base-vertical + 1)); } // Make form groups behave like rows diff --git a/less/panels.less b/less/panels.less index 37ab67043..a6b723c68 100644 --- a/less/panels.less +++ b/less/panels.less @@ -102,7 +102,7 @@ .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; - .border-top-radius(@panel-border-radius - 1); + .border-top-radius((@panel-border-radius - 1)); > .dropdown .dropdown-toggle { color: inherit; @@ -126,7 +126,7 @@ padding: 10px 15px; background-color: @panel-footer-bg; border-top: 1px solid @panel-inner-border; - .border-bottom-radius(@panel-border-radius - 1); + .border-bottom-radius((@panel-border-radius - 1)); } -- 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') 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 27859f6b8f0da4d5325b0eae673dc75c37584a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Wed, 11 Dec 2013 14:25:21 +0100 Subject: Improve pager customization --- less/pager.less | 8 ++++---- less/variables.less | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/pager.less b/less/pager.less index 16993ddc8..9b22b6d38 100644 --- a/less/pager.less +++ b/less/pager.less @@ -15,15 +15,15 @@ > span { display: inline-block; padding: 5px 14px; - background-color: @pagination-bg; - border: 1px solid @pagination-border; + background-color: @pager-bg; + border: 1px solid @pager-border; border-radius: @pager-border-radius; } > a:hover, > a:focus { text-decoration: none; - background-color: @pagination-hover-bg; + background-color: @pager-hover-bg; } } @@ -47,7 +47,7 @@ > a:focus, > span { color: @pager-disabled-color; - background-color: @pagination-bg; + background-color: @pager-bg; cursor: not-allowed; } } diff --git a/less/variables.less b/less/variables.less index fea7bc75a..03382d91f 100644 --- a/less/variables.less +++ b/less/variables.less @@ -363,8 +363,16 @@ // Pager // ------------------------- +@pager-bg: @pagination-bg; +@pager-border: @pagination-border; @pager-border-radius: 15px; -@pager-disabled-color: @gray-light; + +@pager-hover-bg: @pagination-hover-bg; + +@pager-active-bg: @pagination-active-bg; +@pager-active-color: @pagination-active-color; + +@pager-disabled-color: @pagination-disabled-color; // Jumbotron -- cgit v1.2.3 From 2547f1e20f94c592b4125de9006cc45b560af51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Wed, 11 Dec 2013 14:36:26 +0100 Subject: Use variables for breadcrumb padding --- less/breadcrumbs.less | 2 +- less/variables.less | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/breadcrumbs.less b/less/breadcrumbs.less index 60b33ea72..5917778f4 100644 --- a/less/breadcrumbs.less +++ b/less/breadcrumbs.less @@ -4,7 +4,7 @@ .breadcrumb { - padding: 8px 15px; + padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; margin-bottom: @line-height-computed; list-style: none; background-color: @breadcrumb-bg; diff --git a/less/variables.less b/less/variables.less index fea7bc75a..39b1c0a18 100644 --- a/less/variables.less +++ b/less/variables.less @@ -568,10 +568,12 @@ // Breadcrumbs // ------------------------- -@breadcrumb-bg: #f5f5f5; -@breadcrumb-color: #ccc; -@breadcrumb-active-color: @gray-light; -@breadcrumb-separator: "/"; +@breadcrumb-padding-vertical: 8px; +@breadcrumb-padding-horizontal: 15px; +@breadcrumb-bg: #f5f5f5; +@breadcrumb-color: #ccc; +@breadcrumb-active-color: @gray-light; +@breadcrumb-separator: "/"; // Carousel -- cgit v1.2.3 From 4b47c608351d1ac40a4067a163227db29035c47f Mon Sep 17 00:00:00 2001 From: dzwillia Date: Thu, 12 Dec 2013 12:53:59 -0500 Subject: Added @dropdown-caret-color variable back to variables.less (deprecated) --- less/variables.less | 3 +++ 1 file changed, 3 insertions(+) (limited to 'less') diff --git a/less/variables.less b/less/variables.less index 8122161fd..3d7cb660c 100644 --- a/less/variables.less +++ b/less/variables.less @@ -189,6 +189,9 @@ @dropdown-header-color: @gray-light; +// Note: Deprecated @dropdown-caret-color as of v3.1.0 +@dropdown-caret-color: #000; + // COMPONENT VARIABLES // -------------------------------------------------- -- cgit v1.2.3 From ce39cbe6fa4601836ecfced002803576a7b569b0 Mon Sep 17 00:00:00 2001 From: mrasscha Date: Thu, 12 Dec 2013 20:47:16 +0100 Subject: Issue #11852 : create a new variable for the list group active item link text. --- less/list-group.less | 2 +- less/variables.less | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/list-group.less b/less/list-group.less index 35fff05d4..73786a984 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -79,7 +79,7 @@ a.list-group-item { color: inherit; } .list-group-item-text { - color: lighten(@list-group-active-bg, 40%); + color: @list-group-link-text-active-color; } } } diff --git a/less/variables.less b/less/variables.less index 3d7cb660c..c63bbcec2 100644 --- a/less/variables.less +++ b/less/variables.less @@ -505,7 +505,7 @@ @list-group-link-color: #555; @list-group-link-heading-color: #333; - +@list-group-link-text-active-color: lighten(@list-group-active-bg, 40%); // Panels // ------------------------- -- 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') 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 b7bf212995b63d303281023e02777963b265b976 Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Fri, 13 Dec 2013 12:24:20 +0100 Subject: use @zindex-modal for .modal and @zindex-modal-background for .modal-backdrop. removed z-index for .modal-dialog, it was not necessary because the parent element (.modal) already has a z-index. --- less/modals.less | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index 292b5bd9c..717c7b355 100644 --- a/less/modals.less +++ b/less/modals.less @@ -22,7 +22,7 @@ right: 0; bottom: 0; left: 0; - z-index: @zindex-modal-background; + z-index: @zindex-modal; // When fading in the modal, animate it to slide down &.fade .modal-dialog { @@ -37,7 +37,6 @@ position: relative; width: auto; margin: 10px; - z-index: (@zindex-modal-background + 10); } // Actual modal @@ -60,7 +59,7 @@ right: 0; bottom: 0; left: 0; - z-index: (@zindex-modal-background - 10); + z-index: @zindex-modal-background; background-color: @modal-backdrop-bg; // Fade for backdrop &.fade { .opacity(0); } -- 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') 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 From 22820d7151fa155a4e083bf6c940a52e55138735 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 13 Dec 2013 23:06:04 -0800 Subject: Fixes #10495: Float Glyphicon and set margins in .navbar-brand to ensure there is no added height because wtf even is CSS --- less/navbar.less | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 51e3df258..3f8698d09 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -161,6 +161,13 @@ text-decoration: none; } + // Prevent Glyphicons from increasing height of navbar + > .glyphicon { + float: left; + margin-top: -2px; + margin-right: 5px; + } + @media (min-width: @grid-float-breakpoint) { .navbar > .container &, .navbar > .container-fluid & { -- cgit v1.2.3 From 914f5e6a1d6faf57988cd26c31200796a4b743a9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 11:44:54 -0800 Subject: Fixes #11867: Add `@panel-body-padding` variable --- less/panels.less | 2 +- less/variables.less | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/panels.less b/less/panels.less index a6b723c68..ad133ad21 100644 --- a/less/panels.less +++ b/less/panels.less @@ -14,7 +14,7 @@ // Panel contents .panel-body { - padding: 15px; + padding: @panel-body-padding; &:extend(.clearfix all); } diff --git a/less/variables.less b/less/variables.less index 3d7cb660c..15db9538a 100644 --- a/less/variables.less +++ b/less/variables.less @@ -510,8 +510,10 @@ // Panels // ------------------------- @panel-bg: #fff; -@panel-inner-border: #ddd; +@panel-body-padding: 15px; @panel-border-radius: @border-radius-base; + +@panel-inner-border: #ddd; @panel-footer-bg: #f5f5f5; @panel-default-text: @gray-dark; -- cgit v1.2.3 From 11c6ab767cab5384188a301f7c9366b212432e81 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 13:22:56 -0800 Subject: Fixes #10370: Improved and deprecated dropdown menu alignment options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes an old pair of selectors that didn’t properly target the right-aligned navbar alignment of dropdown menus. * Deprecates the `.pull-right` alignment in favor of a more specific and unique class name. * Adds `.dropdown-menu-right` as the new alignment class. This is then mixin-ed into the `.navbar-right.navbar-nav` dropdown menus for auto-alignment. * To override that auto-alignment, use `.dropdown-menu-left` as needed. --- less/dropdowns.less | 28 +++++++++++++++++++++++++++- less/navbar.less | 7 ------- 2 files changed, 27 insertions(+), 8 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 4bdc223fc..dde2038e3 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -46,6 +46,8 @@ background-clip: padding-box; // Aligns the dropdown menu to right + // + // Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]` &.pull-right { right: 0; left: auto; @@ -126,6 +128,25 @@ } } +// Menu positioning +// +// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown +// menu with the parent. +.dropdown-menu-right { + left: auto; // Reset the default from `.dropdown-menu` + right: 0; +} +// With v3, we enabled auto-flipping if you have a dropdown within a right +// aligned nav component. To enable the undoing of that, we provide an override +// to restore the default dropdown menu alignment. +// +// This is only for left-aligning a dropdown menu within a `.navbar-right` or +// `.pull-right` nav component. +.dropdown-menu-left { + left: 0; + right: auto; +} + // Dropdown section headers .dropdown-header { display: block; @@ -180,7 +201,12 @@ @media (min-width: @grid-float-breakpoint) { .navbar-right { .dropdown-menu { - .pull-right > .dropdown-menu(); + .dropdown-menu-right(); + } + // Necessary for overrides of the default right aligned menu. + // Will remove come v4 in all likelihood. + .dropdown-menu-left { + .dropdown-menu-left(); } } } diff --git a/less/navbar.less b/less/navbar.less index 3f8698d09..d96f85e30 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -336,13 +336,6 @@ .border-bottom-radius(0); } -// Right aligned menus need alt position -.navbar-nav.pull-right > li > .dropdown-menu, -.navbar-nav > li > .dropdown-menu.pull-right { - left: auto; - right: 0; -} - // Buttons in navbars // -- cgit v1.2.3 From 544b8ecab78c322bf826797374c0b10279cedf1f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 16:03:21 -0800 Subject: Fixes #10921: Add support for input groups within button toolbars * Floats any `.input-group` within a toolbar * Simplifies the CSS to remove sibling selectors and instead use a negative amrgin on the parent with only `margin-left` See it in action: http://jsbin.com/aGEcUqAT/1/. --- less/button-groups.less | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index ef9c34e77..794839d62 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -37,18 +37,17 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { + margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); - .btn-group { + .btn-group, + .input-group { float: left; } - // Space out series of button groups > .btn, - > .btn-group { - + .btn, - + .btn-group { - margin-left: 5px; - } + > .btn-group, + > .input-group { + margin-left: 5px; } } -- cgit v1.2.3 From 432b9f9cde8e2b067fd54ed148c5f8df510e30c5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 20:04:12 -0800 Subject: Fixes #11561: Add float: left; to .form-control within input groups to prevent IE9 from screwing up placeholder text and select menu arrows --- less/input-groups.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/input-groups.less b/less/input-groups.less index 0eb9a6fc4..39f705ad3 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -17,6 +17,11 @@ } .form-control { + // IE9 fubars the placeholder attribute in text inputs and the arrows on + // select elements in input groups. To fix it, we float the input. Details: + // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 + float: left; + width: 100%; margin-bottom: 0; } -- cgit v1.2.3 From 072ccd4ddad1dcf642e27497c5253ce578182719 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 21:40:16 -0800 Subject: Fixes #11572: Add contextual background-color classes to match text classes; move both sets of classes to Helper Classes section of the CSS docs --- less/type.less | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 24a581fe8..52f9b5b2b 100644 --- a/less/type.less +++ b/less/type.less @@ -81,7 +81,13 @@ small, // Undo browser default styling cite { font-style: normal; } -// Contextual emphasis +// Alignment +.text-left { text-align: left; } +.text-right { text-align: right; } +.text-center { text-align: center; } +.text-justify { text-align: justify; } + +// Contextual colors .text-muted { color: @text-muted; } @@ -116,11 +122,42 @@ cite { font-style: normal; } } } -// Alignment -.text-left { text-align: left; } -.text-right { text-align: right; } -.text-center { text-align: center; } -.text-justify { text-align: justify; } +// Contextual backgrounds +// For now we'll leave these alongside the text classes until v4 when we can +// safely shift things around (per SemVer rules). +.bg-primary { + // Given the contrast here, this is the only class to have it's color inverted + // automatically. + color: #fff; + background-color: @brand-primary; + a&:hover { + background-color: darken(@brand-primary, 10%); + } +} +.bg-warning { + background-color: @state-warning-bg; + a&:hover { + background-color: darken(@state-warning-bg, 10%); + } +} +.bg-danger { + background-color: @state-danger-bg; + a&:hover { + background-color: darken(@state-danger-bg, 10%); + } +} +.bg-success { + background-color: @state-success-bg; + a&:hover { + background-color: darken(@state-success-bg, 10%); + } +} +.bg-info { + background-color: @state-info-bg; + a&:hover { + background-color: darken(@state-info-bg, 10%); + } +} // Page header -- cgit v1.2.3 From 647e9eb0f192a18ee84b7e8a4ca162354d98cebb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 21:43:08 -0800 Subject: Fixes #11555: Add `@tooltip-opacity` variable --- less/tooltip.less | 2 +- less/variables.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/tooltip.less b/less/tooltip.less index ce793cb93..bd626996f 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -13,7 +13,7 @@ line-height: 1.4; .opacity(0); - &.in { .opacity(.9); } + &.in { .opacity(@tooltip-opacity); } &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } diff --git a/less/variables.less b/less/variables.less index a86e4e4b8..0c75d71f6 100644 --- a/less/variables.less +++ b/less/variables.less @@ -405,6 +405,7 @@ @tooltip-max-width: 200px; @tooltip-color: #fff; @tooltip-bg: #000; +@tooltip-opacity: .9; @tooltip-arrow-width: 5px; @tooltip-arrow-color: @tooltip-bg; -- cgit v1.2.3 From 168469f545a189fa51e5d36546e7972f4748ec3f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 21:50:47 -0800 Subject: Fixes #11588: Scope font-size to only p elements in a .jumbotron and remove the supersized line-height from the base class --- less/jumbotron.less | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/jumbotron.less b/less/jumbotron.less index 0460b69d4..a15e16971 100644 --- a/less/jumbotron.less +++ b/less/jumbotron.less @@ -6,19 +6,17 @@ .jumbotron { padding: @jumbotron-padding; margin-bottom: @jumbotron-padding; - font-size: @jumbotron-font-size; - font-weight: 200; - line-height: (@line-height-base * 1.5); color: @jumbotron-color; background-color: @jumbotron-bg; h1, .h1 { - line-height: 1; color: @jumbotron-heading-color; } p { - line-height: 1.4; + margin-bottom: (@jumbotron-padding / 2); + font-size: @jumbotron-font-size; + font-weight: 200; } .container & { -- cgit v1.2.3 From 82c52a7e9d35d42df3ef3bc88bffdf5ba2bae98c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 10:38:54 -0800 Subject: Fixes #11801: use correct variables for grid containers --- less/grid.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/grid.less b/less/grid.less index dfae6999b..88957f42a 100644 --- a/less/grid.less +++ b/less/grid.less @@ -10,10 +10,10 @@ .container { .container-fixed(); - @media (min-width: @screen-sm) { + @media (min-width: @screen-sm-min) { width: @container-sm; } - @media (min-width: @screen-md) { + @media (min-width: @screen-md-min) { width: @container-md; } @media (min-width: @screen-lg-min) { -- cgit v1.2.3 From ad782ff89a9d78345d9d020744c4b0510329615f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 10:53:53 -0800 Subject: comments and spacing --- less/mixins.less | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index ae4acd34e..129891cf5 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -638,30 +638,24 @@ position: relative; float: left; width: percentage((@columns / @grid-columns)); - // Prevent columns from collapsing when empty min-height: 1px; - // Inner gutter via padding padding-left: (@gutter / 2); padding-right: (@gutter / 2); } + // Generate the small columns .make-sm-column(@columns; @gutter: @grid-gutter-width) { position: relative; - // Prevent columns from collapsing when empty min-height: 1px; - // Inner gutter via padding padding-left: (@gutter / 2); padding-right: (@gutter / 2); - // Calculate width based on number of columns available @media (min-width: @screen-sm-min) { float: left; width: percentage((@columns / @grid-columns)); } } - -// Generate the small column offsets .make-sm-column-offset(@columns) { @media (min-width: @screen-sm-min) { margin-left: percentage((@columns / @grid-columns)); @@ -678,23 +672,19 @@ } } + // Generate the medium columns .make-md-column(@columns; @gutter: @grid-gutter-width) { position: relative; - // Prevent columns from collapsing when empty min-height: 1px; - // Inner gutter via padding padding-left: (@gutter / 2); padding-right: (@gutter / 2); - // Calculate width based on number of columns available @media (min-width: @screen-md-min) { float: left; width: percentage((@columns / @grid-columns)); } } - -// Generate the medium column offsets .make-md-column-offset(@columns) { @media (min-width: @screen-md-min) { margin-left: percentage((@columns / @grid-columns)); @@ -711,23 +701,19 @@ } } + // Generate the large columns .make-lg-column(@columns; @gutter: @grid-gutter-width) { position: relative; - // Prevent columns from collapsing when empty min-height: 1px; - // Inner gutter via padding padding-left: (@gutter / 2); padding-right: (@gutter / 2); - // Calculate width based on number of columns available @media (min-width: @screen-lg-min) { float: left; width: percentage((@columns / @grid-columns)); } } - -// Generate the large column offsets .make-lg-column-offset(@columns) { @media (min-width: @screen-lg-min) { margin-left: percentage((@columns / @grid-columns)); -- cgit v1.2.3 From a319ec5b7d19a464d86fa604b53c84ff2c480ebb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 11:02:32 -0800 Subject: Fixes #11829: Adds .make-xs-column mixins --- less/mixins.less | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 129891cf5..66026f52a 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -642,6 +642,21 @@ padding-left: (@gutter / 2); padding-right: (@gutter / 2); } +.make-xs-column-offset(@columns) { + @media (min-width: @screen-xs-min) { + margin-left: percentage((@columns / @grid-columns)); + } +} +.make-xs-column-push(@columns) { + @media (min-width: @screen-xs-min) { + left: percentage((@columns / @grid-columns)); + } +} +.make-xs-column-pull(@columns) { + @media (min-width: @screen-xs-min) { + right: percentage((@columns / @grid-columns)); + } +} // Generate the small columns -- cgit v1.2.3 From 2b86e05a6150ef13905519070ea82ce895fbae85 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 11:09:03 -0800 Subject: Change variable --- less/list-group.less | 2 +- less/variables.less | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'less') diff --git a/less/list-group.less b/less/list-group.less index 73786a984..ed3bfa5a5 100644 --- a/less/list-group.less +++ b/less/list-group.less @@ -79,7 +79,7 @@ a.list-group-item { color: inherit; } .list-group-item-text { - color: @list-group-link-text-active-color; + color: @list-group-active-text-color; } } } diff --git a/less/variables.less b/less/variables.less index 39f1f4d86..faccd927c 100644 --- a/less/variables.less +++ b/less/variables.less @@ -499,18 +499,18 @@ // List group // ------------------------- -@list-group-bg: #fff; -@list-group-border: #ddd; -@list-group-border-radius: @border-radius-base; - -@list-group-hover-bg: #f5f5f5; -@list-group-active-color: @component-active-color; -@list-group-active-bg: @component-active-bg; -@list-group-active-border: @list-group-active-bg; - -@list-group-link-color: #555; -@list-group-link-heading-color: #333; -@list-group-link-text-active-color: lighten(@list-group-active-bg, 40%); +@list-group-bg: #fff; +@list-group-border: #ddd; +@list-group-border-radius: @border-radius-base; + +@list-group-hover-bg: #f5f5f5; +@list-group-active-color: @component-active-color; +@list-group-active-bg: @component-active-bg; +@list-group-active-border: @list-group-active-bg; +@list-group-active-text-color: lighten(@list-group-active-bg, 40%); + +@list-group-link-color: #555; +@list-group-link-heading-color: #333; // Panels // ------------------------- -- cgit v1.2.3 From a7029edc612745db1edb318b366d7bf229c3a8a5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 11:29:58 -0800 Subject: Restyle the blockquote to not thin text or change line-height --- less/type.less | 2 -- 1 file changed, 2 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 52f9b5b2b..6c418a489 100644 --- a/less/type.less +++ b/less/type.less @@ -266,8 +266,6 @@ blockquote { border-left: 5px solid @blockquote-border-color; p { font-size: (@font-size-base * 1.25); - font-weight: 300; - line-height: 1.25; } p:last-child { margin-bottom: 0; -- cgit v1.2.3 From c7c9929c1265a536dd9a75f358c107de39681b35 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 12:31:40 -0800 Subject: Fixes #11770: Move component-animations.less to the utility section of import list to match Customizer --- less/bootstrap.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less') diff --git a/less/bootstrap.less b/less/bootstrap.less index b368b8710..a46d8d3d4 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -16,7 +16,6 @@ @import "buttons.less"; // Components -@import "component-animations.less"; @import "glyphicons.less"; @import "dropdowns.less"; @import "button-groups.less"; @@ -45,5 +44,6 @@ @import "carousel.less"; // Utility classes +@import "component-animations.less"; @import "utilities.less"; @import "responsive-utilities.less"; -- cgit v1.2.3