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 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 f4eb3df50ad43171ae37ccd1208a5bed72cc6ecb Mon Sep 17 00:00:00 2001 From: Sam Blowes Date: Fri, 15 Nov 2013 16:48:24 +0000 Subject: Fixed single btn in btn-group-veritcal not being rounded --- less/button-groups.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index c25357622..97d5d3e3d 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -218,13 +218,13 @@ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group-vertical > .btn-group:first-child { +.btn-group-vertical > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { .border-bottom-radius(0); } } -.btn-group-vertical > .btn-group:last-child > .btn:first-child { +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { .border-top-radius(0); } -- 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 0fcaca86b57bf3a4fa2c8f709e90499c92e0db73 Mon Sep 17 00:00:00 2001 From: Joah Gerstenberg Date: Mon, 2 Dec 2013 14:56:23 -0600 Subject: Fixes #11669 - Adds smooth modal scrolling on iOS by default --- less/modals.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/modals.less b/less/modals.less index e65dbf7f1..bfb80c282 100644 --- a/less/modals.less +++ b/less/modals.less @@ -23,7 +23,8 @@ bottom: 0; left: 0; z-index: @zindex-modal-background; - + -webkit-overflow-scrolling: touch; + // When fading in the modal, animate it to slide down &.fade .modal-dialog { .translate(0, -25%); -- 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 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 3b5e0c9a3cae9bfae38253ae153a3426d1f81ad3 Mon Sep 17 00:00:00 2001 From: Tobias Lindig Date: Tue, 10 Dec 2013 16:47:12 +0100 Subject: hide space characters in input-group-btn to fix segmented buttons double border --- less/input-groups.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/input-groups.less b/less/input-groups.less index d19c4c64a..dc6e825f0 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -112,7 +112,10 @@ // ------------------------- .input-group-btn { position: relative; + // Jankily prevent input button groups from wrapping white-space: nowrap; + // in combination with inline-blocks and nowrap, space characters would take visible space + font-size: 0; // Negative margin to only have a 1px border between the two &:first-child > .btn { @@ -124,9 +127,8 @@ } .input-group-btn > .btn { position: relative; - // Jankily prevent input button groups from wrapping + .btn { - margin-left: -4px; + margin-left: -1px; } // Bring the "active" button to the front &:hover, -- 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 From f5c13a3e1b2beef5e3335a710993ff8b383d76f7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 14:14:09 -0800 Subject: revert an earlier change to move the component-animations.less file because it fubared modal backdrop .fade usage --- 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 a46d8d3d4..b368b8710 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -16,6 +16,7 @@ @import "buttons.less"; // Components +@import "component-animations.less"; @import "glyphicons.less"; @import "dropdowns.less"; @import "button-groups.less"; @@ -44,6 +45,5 @@ @import "carousel.less"; // Utility classes -@import "component-animations.less"; @import "utilities.less"; @import "responsive-utilities.less"; -- cgit v1.2.3 From 393d523cdbf14c4522ed13dca701120aeded352c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 14:23:55 -0800 Subject: Fixes #11660: Depcreate small and .small in blockquote in favor of footer --- less/type.less | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'less') diff --git a/less/type.less b/less/type.less index 6c418a489..9d032b268 100644 --- a/less/type.less +++ b/less/type.less @@ -270,6 +270,10 @@ blockquote { p:last-child { margin-bottom: 0; } + + // Deprecating small and .small for v3.1 + // Context: https://github.com/twbs/bootstrap/issues/11660 + footer, small, .small { display: block; -- cgit v1.2.3 From b04a1de9b097de7f4df95b30df040efe86563e75 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 14:52:49 -0800 Subject: Fixes #11402: Updated fix for select.form-control width in inline-forms --- less/forms.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index f7fc5d66c..d2d089c30 100644 --- a/less/forms.less +++ b/less/forms.less @@ -311,6 +311,11 @@ input[type="checkbox"], width: auto; } + // Override `width: 100%;` when not within a `.form-group` + > select.form-control { + width: auto; + } + // Remove default margin on radios/checkboxes that were used for stacking, and // then undo the floating of radios and checkboxes to match (which also avoids // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). -- cgit v1.2.3 From 4f22670c6ecfd4239fe690719867531c18721234 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 15:24:52 -0800 Subject: formatting and comment --- less/forms.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index d2d089c30..e623c42e5 100644 --- a/less/forms.less +++ b/less/forms.less @@ -226,7 +226,12 @@ input[type="checkbox"], } } + // Form control sizing +// +// Build on `.form-control` with modifier classes to decrease or increase the +// height and font-size of form controls. + .input-sm { .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } -- cgit v1.2.3 From d9345ff7d55e3982b36f88cb7459239a773bbfda Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 15:27:46 -0800 Subject: Fixes #11266: Apply a pixel-based line-height to date inputs for iOS 7 --- less/forms.less | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index e623c42e5..a5f966802 100644 --- a/less/forms.less +++ b/less/forms.less @@ -155,6 +155,14 @@ output { } } +// Special styles for iOS date input +// +// In Mobile Safari, date inputs require a pixel line-height that matches the +// given height of the input. +input[type="date"] { + line-height: @input-height-base; +} + // Form groups // -- cgit v1.2.3 From 2979e4bcea25c428c801d77153dc0f663618ce20 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 17:15:09 -0800 Subject: Add new form feedback states, clean up existing form styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New stuff: * Adds `.has-feedback` and `.form-control-feedback` to show icon-based form feedback to users. Fixes #11836. * Removes the `width: 1em` on `.glyphicon` because it makes it impractical to resize the width of all icons, even if they’re not “empty” (e.g., a simple `.glyphicon { width: 30px; }` wouldn’t work, nor would a class preceeded by a parent class. Clean up: * Sets `width: auto;` on all `.form-control`s within inline forms. * Removes all the inline `select` menu `width` styles because all inputs are now `auto`. * Update form states docs to separate out sections better. --- less/forms.less | 57 +++++++++++++++++++++++++++++++++++++++++----------- less/glyphicons.less | 4 ---- less/mixins.less | 4 ++++ 3 files changed, 49 insertions(+), 16 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index a5f966802..530257499 100644 --- a/less/forms.less +++ b/less/forms.less @@ -253,15 +253,35 @@ input[type="checkbox"], // // Apply contextual and semantic states to individual form controls. -// Warning +.has-feedback { + // Enable absolute positioning + position: relative; + + // Ensure icons don't overlap text + .form-control { + padding-right: (@input-height-base * 1.25); + } + + // Feedback icon (requires .glyphicon classes) + .form-control-feedback { + position: absolute; + top: (@line-height-computed + 5); // Height of the `label` and it's margin + right: 0; + display: block; + width: @input-height-base; + height: @input-height-base; + line-height: @input-height-base; + text-align: center; + } +} + +// Feedback states .has-warning { .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); } -// Error .has-error { .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); } -// Success .has-success { .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); } @@ -307,7 +327,7 @@ input[type="checkbox"], // Kick in the inline @media (min-width: @screen-sm) { // Inline-block all the things for "inline" - .form-group { + .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; @@ -316,17 +336,13 @@ input[type="checkbox"], // In navbar-form, allow folks to *not* use `.form-group` .form-control { display: inline-block; + width: auto; // Prevent labels from stacking above inputs in `.form-group` vertical-align: middle; } - // Override `width: 100%;` when not within a `.form-group` - select.form-control { - width: auto; - } - - // Override `width: 100%;` when not within a `.form-group` - > select.form-control { - width: auto; + .control-label { + margin-bottom: 0; + vertical-align: middle; } // Remove default margin on radios/checkboxes that were used for stacking, and @@ -345,6 +361,14 @@ input[type="checkbox"], float: none; margin-left: 0; } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + } } } @@ -388,4 +412,13 @@ input[type="checkbox"], text-align: right; } } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + right: (@grid-gutter-width / 2); + } } diff --git a/less/glyphicons.less b/less/glyphicons.less index 8a68f11ef..29ce1c071 100644 --- a/less/glyphicons.less +++ b/less/glyphicons.less @@ -28,10 +28,6 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - - &:empty { - width: 1em; - } } // Individual icons diff --git a/less/mixins.less b/less/mixins.less index 66026f52a..5bcaeabbc 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -851,6 +851,10 @@ border-color: @border-color; background-color: @background-color; } + // Optional feedack icon + .form-control-feedback { + color: @text-color; + } } // Form control focus state -- cgit v1.2.3 From 4ee93c9f8529cfeef56d4178b91e1ddcb0bff09c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 15 Dec 2013 17:22:55 -0800 Subject: Fixes #10492 again, this time for last row's corners on striped tables --- less/panels.less | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'less') diff --git a/less/panels.less b/less/panels.less index ad133ad21..1b72cebd1 100644 --- a/less/panels.less +++ b/less/panels.less @@ -95,6 +95,17 @@ border: 0; margin-bottom: 0; } + > .table-striped > tbody > tr:last-child, + > .table-responsive > .table-striped > tbody > tr:last-child { + td:first-child, + th:first-child { + border-bottom-left-radius: (@panel-border-radius - 1); + } + td:last-child, + th:last-child { + border-bottom-left-radius: (@panel-border-radius - 1); + } + } } -- cgit v1.2.3 From be508e043c2a5f53b352066a1628693adfa7755e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 15 Dec 2013 18:13:50 -0800 Subject: copyediting --- less/forms.less | 2 +- less/navbar.less | 2 +- less/navs.less | 2 +- less/panels.less | 2 +- less/type.less | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index 530257499..aefa5a462 100644 --- a/less/forms.less +++ b/less/forms.less @@ -265,7 +265,7 @@ input[type="checkbox"], // Feedback icon (requires .glyphicon classes) .form-control-feedback { position: absolute; - top: (@line-height-computed + 5); // Height of the `label` and it's margin + top: (@line-height-computed + 5); // Height of the `label` and its margin right: 0; display: block; width: @input-height-base; diff --git a/less/navbar.less b/less/navbar.less index d96f85e30..621772fbb 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -212,7 +212,7 @@ // Navbar nav links // -// Builds on top of the `.nav` components with it's own modifier class to make +// Builds on top of the `.nav` components with its own modifier class to make // the nav the full height of the horizontal nav (above 768px). .navbar-nav { diff --git a/less/navs.less b/less/navs.less index e4ac14459..9e729b39f 100644 --- a/less/navs.less +++ b/less/navs.less @@ -91,7 +91,7 @@ } } - // Active state, and it's :hover to override normal :hover + // Active state, and its :hover to override normal :hover &.active > a { &, &:hover, diff --git a/less/panels.less b/less/panels.less index 1b72cebd1..eefaf2e87 100644 --- a/less/panels.less +++ b/less/panels.less @@ -120,7 +120,7 @@ } } -// Within heading, strip any `h*` tag of it's default margins for spacing. +// Within heading, strip any `h*` tag of its default margins for spacing. .panel-title { margin-top: 0; margin-bottom: 0; diff --git a/less/type.less b/less/type.less index 9d032b268..5373975d2 100644 --- a/less/type.less +++ b/less/type.less @@ -126,7 +126,7 @@ cite { font-style: normal; } // 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 + // Given the contrast here, this is the only class to have its color inverted // automatically. color: #fff; background-color: @brand-primary; -- cgit v1.2.3 From 637b20f6d584913815a60f0429b8e76c3bd10375 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 15 Dec 2013 20:38:06 -0800 Subject: minor refactoring of 4ee93c9f8529cfeef56d4178b91e1ddcb0bff09c --- less/panels.less | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'less') diff --git a/less/panels.less b/less/panels.less index eefaf2e87..ef8786867 100644 --- a/less/panels.less +++ b/less/panels.less @@ -95,15 +95,17 @@ border: 0; margin-bottom: 0; } - > .table-striped > tbody > tr:last-child, - > .table-responsive > .table-striped > tbody > tr:last-child { - td:first-child, - th:first-child { - border-bottom-left-radius: (@panel-border-radius - 1); - } - td:last-child, - th:last-child { - border-bottom-left-radius: (@panel-border-radius - 1); + > .table-striped, + > .table-responsive > .table-striped { + > tbody > tr:last-child { + td:first-child, + th:first-child { + border-bottom-left-radius: (@panel-border-radius - 1); + } + td:last-child, + th:last-child { + border-bottom-left-radius: (@panel-border-radius - 1); + } } } } -- cgit v1.2.3 From ae640d4f1cea3b12fcfbf2d6c8d5bb3c29c9aadf Mon Sep 17 00:00:00 2001 From: Sebastian Podjasek Date: Mon, 16 Dec 2013 22:47:09 +0100 Subject: Fix handling of btn-group placed inside input-group-btn (used for mixing dropdowns with normal buttons) --- less/input-groups.less | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/input-groups.less b/less/input-groups.less index de1e68903..b486cf4d2 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -95,8 +95,10 @@ .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { .border-right-radius(0); } .input-group-addon:first-child { @@ -105,8 +107,10 @@ .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { .border-left-radius(0); } .input-group-addon:last-child { @@ -138,10 +142,16 @@ } // Negative margin to only have a 1px border between the two - &:first-child > .btn { - margin-right: -1px; + &:first-child { + > .btn, + > .btn-group { + margin-right: -1px; + } } - &:last-child > .btn { - margin-left: -1px; + &:last-child { + > .btn, + > .btn-group { + margin-left: -1px; + } } } -- cgit v1.2.3 From d15218a09ce68d0854d0aa5f5170c1ea859aee31 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 18 Dec 2013 09:49:05 -0800 Subject: Fixes #11899: Ensure proper margins and .small/small usage for heading tags (e.g., .h1-.h6) --- less/type.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index 5373975d2..1d01b9a71 100644 --- a/less/type.less +++ b/less/type.less @@ -21,9 +21,9 @@ h1, h2, h3, h4, h5, h6, } } -h1, -h2, -h3 { +h1, .h1, +h2, .h2, +h3, .h3 { margin-top: @line-height-computed; margin-bottom: (@line-height-computed / 2); @@ -32,9 +32,9 @@ h3 { font-size: 65%; } } -h4, -h5, -h6 { +h4, .h4, +h5, .h5, +h6, .h6 { margin-top: (@line-height-computed / 2); margin-bottom: (@line-height-computed / 2); -- cgit v1.2.3