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 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 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 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 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