aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorfat <[email protected]>2014-06-23 23:08:23 -0700
committerfat <[email protected]>2014-06-23 23:08:23 -0700
commit0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3 (patch)
tree7b88c388d526ada7b564f1faf44cda92276f2722 /less
parentf071549c8408241b88a95192e477816d2402eb6e (diff)
parentb31c35b63629ec750f338a646f6b730bd675b734 (diff)
downloadbootstrap-0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3.tar.xz
bootstrap-0aa01f63e33e0fb4c0c770dba7d2a631b9b562d3.zip
Merge branch 'master' into fix-13386
Conflicts: js/carousel.js
Diffstat (limited to 'less')
-rw-r--r--less/alerts.less5
-rw-r--r--less/buttons.less2
-rw-r--r--less/dropdowns.less1
-rw-r--r--less/forms.less60
-rw-r--r--less/list-group.less4
-rw-r--r--less/mixins/image.less1
-rw-r--r--less/mixins/progress-bar.less2
-rw-r--r--less/mixins/vendor-prefixes.less8
-rw-r--r--less/progress-bars.less13
-rw-r--r--less/theme.less11
-rw-r--r--less/type.less8
-rw-r--r--less/variables.less4
12 files changed, 88 insertions, 31 deletions
diff --git a/less/alerts.less b/less/alerts.less
index c3afeb958..df070b8ab 100644
--- a/less/alerts.less
+++ b/less/alerts.less
@@ -33,11 +33,12 @@
}
}
-// Dismissable alerts
+// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
-.alert-dismissable {
+.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
+.alert-dismissible {
padding-right: (@alert-padding + 20);
// Adjust close link position
diff --git a/less/buttons.less b/less/buttons.less
index d4fc156be..492bdc65a 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -140,8 +140,6 @@
.btn-block {
display: block;
width: 100%;
- padding-left: 0;
- padding-right: 0;
}
// Vertically space out multiple block buttons
diff --git a/less/dropdowns.less b/less/dropdowns.less
index 8d0a6a2d0..3eb7fc05c 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -155,6 +155,7 @@
font-size: @font-size-small;
line-height: @line-height-base;
color: @dropdown-header-color;
+ white-space: nowrap; // as with > li > a
}
// Backdrop to catch body clicks on mobile, etc.
diff --git a/less/forms.less b/less/forms.less
index 2f629b0a1..841762f4c 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -281,6 +281,26 @@ input[type="checkbox"] {
}
+// Static form control text
+//
+// Apply class to a `p` element to make any string of text align with labels in
+// a horizontal form layout.
+
+.form-control-static {
+ // Size it appropriately next to real form controls
+ padding-top: (@padding-base-vertical + 1);
+ padding-bottom: (@padding-base-vertical + 1);
+ // Remove default margin from `p`
+ margin-bottom: 0;
+
+ &.input-lg,
+ &.input-sm {
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
+
+
// Form control sizing
//
// Build on `.form-control` with modifier classes to decrease or increase the
@@ -349,16 +369,6 @@ input[type="checkbox"] {
}
-// Static form control text
-//
-// Apply class to a `p` element to make any string of text align with labels in
-// a horizontal form layout.
-
-.form-control-static {
- margin-bottom: 0; // Remove default margin from `p`
-}
-
-
// Help text
//
// Apply to any element you wish to create light text for placement immediately
@@ -484,11 +494,6 @@ input[type="checkbox"] {
.make-row();
}
- .form-control-static {
- padding-top: (@padding-base-vertical + 1);
- padding-bottom: (@padding-base-vertical + 1);
- }
-
// Reset spacing and right align labels, but scope to media queries so that
// labels on narrow viewports stack the same as a default form example.
@media (min-width: @screen-sm-min) {
@@ -507,4 +512,29 @@ input[type="checkbox"] {
top: 0;
right: (@grid-gutter-width / 2);
}
+
+ // Form group sizes
+ //
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
+ // inputs and labels within a `.form-group`.
+ .form-group-lg {
+ @media (min-width: @screen-sm-min) {
+ .control-label {
+ padding-top: ((@padding-large-vertical * @line-height-large) + 1);
+ }
+ }
+ .form-control {
+ &:extend(.input-lg);
+ }
+ }
+ .form-group-sm {
+ @media (min-width: @screen-sm-min) {
+ .control-label {
+ padding-top: (@padding-small-vertical + 1);
+ }
+ }
+ .form-control {
+ &:extend(.input-sm);
+ }
+ }
}
diff --git a/less/list-group.less b/less/list-group.less
index 2514389b1..1946bf59f 100644
--- a/less/list-group.less
+++ b/less/list-group.less
@@ -94,7 +94,9 @@ a.list-group-item {
border-color: @list-group-active-border;
// Force color to inherit for custom content
- .list-group-item-heading {
+ .list-group-item-heading,
+ .list-group-item-heading > small,
+ .list-group-item-heading > .small {
color: inherit;
}
.list-group-item-text {
diff --git a/less/mixins/image.less b/less/mixins/image.less
index f233cb3e1..5d2cccb27 100644
--- a/less/mixins/image.less
+++ b/less/mixins/image.less
@@ -8,6 +8,7 @@
// Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) {
display: @display;
+ width: 100% \9; // Force IE10 and below to size SVG images correctly
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
}
diff --git a/less/mixins/progress-bar.less b/less/mixins/progress-bar.less
index f71a57154..f07996a34 100644
--- a/less/mixins/progress-bar.less
+++ b/less/mixins/progress-bar.less
@@ -2,6 +2,8 @@
.progress-bar-variant(@color) {
background-color: @color;
+
+ // Deprecated parent class requirement as of v3.2.0
.progress-striped & {
#gradient > .striped();
}
diff --git a/less/mixins/vendor-prefixes.less b/less/mixins/vendor-prefixes.less
index 4418ac911..e2008c8b2 100644
--- a/less/mixins/vendor-prefixes.less
+++ b/less/mixins/vendor-prefixes.less
@@ -1,6 +1,6 @@
// Vendor Prefixes
//
-// All vendor mixins are deprecated as of v3.2 due to the introduction of
+// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They will be removed in v4.
// - Animations
@@ -131,10 +131,10 @@
transform: scaleY(@ratio);
}
.skew(@x; @y) {
- -webkit-transform: skew(@x, @y);
+ -webkit-transform: skewX(@x) skewY(@y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
- -o-transform: skew(@x, @y);
- transform: skew(@x, @y);
+ -o-transform: skewX(@x) skewY(@y);
+ transform: skewX(@x) skewY(@y);
}
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
diff --git a/less/progress-bars.less b/less/progress-bars.less
index 74b702843..3d4e6306f 100644
--- a/less/progress-bars.less
+++ b/less/progress-bars.less
@@ -41,13 +41,22 @@
}
// Striped bars
-.progress-striped .progress-bar {
+//
+// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
+// `.progress-bar-striped` class, which you just add to an existing
+// `.progress-bar`.
+.progress-striped .progress-bar,
+.progress-bar-striped {
#gradient > .striped();
background-size: 40px 40px;
}
// Call animation for the active one
-.progress.active .progress-bar {
+//
+// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
+// `.progress-bar.active` approach.
+.progress.active .progress-bar,
+.progress-bar.active {
.animation(progress-bar-stripes 2s linear infinite);
}
diff --git a/less/theme.less b/less/theme.less
index 6f957fb39..b089424cf 100644
--- a/less/theme.less
+++ b/less/theme.less
@@ -48,6 +48,12 @@
background-color: darken(@btn-color, 12%);
border-color: darken(@btn-color, 14%);
}
+
+ &:disabled,
+ &[disabled] {
+ background-color: darken(@btn-color, 12%);
+ background-image: none;
+ }
}
// Common styles
@@ -191,6 +197,11 @@
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
+// Reset the striped class because our mixins don't do multiple gradients and
+// the above custom styles override the new `.progress-bar-striped` in v3.2.0.
+.progress-bar-striped {
+ #gradient > .striped();
+}
//
diff --git a/less/type.less b/less/type.less
index 93414474a..9b1e48bae 100644
--- a/less/type.less
+++ b/less/type.less
@@ -74,10 +74,10 @@ p {
// Emphasis & misc
// -------------------------
-// Ex: 14px base font * 85% = about 12px
+// Ex: (12px small font / 14px base font) * 100% = about 85%
small,
.small {
- font-size: 85%;
+ font-size: floor((100% * @font-size-small / @font-size-base));
}
// Undo browser default styling
@@ -219,13 +219,13 @@ dd {
@media (min-width: @grid-float-breakpoint) {
dt {
float: left;
- width: (@component-offset-horizontal - 20);
+ width: (@dl-horizontal-offset - 20);
clear: left;
text-align: right;
.text-overflow();
}
dd {
- margin-left: @component-offset-horizontal;
+ margin-left: @dl-horizontal-offset;
}
}
}
diff --git a/less/variables.less b/less/variables.less
index a2e464b6e..2f339fb41 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -10,7 +10,7 @@
@gray-darker: lighten(#000, 13.5%); // #222
@gray-dark: lighten(#000, 20%); // #333
@gray: lighten(#000, 33.5%); // #555
-@gray-light: lighten(#000, 60%); // #999
+@gray-light: lighten(#000, 46.7%); // #777
@gray-lighter: lighten(#000, 93.5%); // #eee
@brand-primary: #428bca;
@@ -836,6 +836,8 @@
@blockquote-border-color: @gray-lighter;
//** Page header border color
@page-header-border-color: @gray-lighter;
+//** Width of horizontal description list titles
+@dl-horizontal-offset: @component-offset-horizontal;
//== Miscellaneous