aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-02-08 16:52:22 -0800
committerMark Otto <[email protected]>2014-02-08 16:52:22 -0800
commite9199718d64dadc22d61b4cea8c77a2307455823 (patch)
treeb10f0174a9d564da40df55d658136fef74b6adb9 /less
parent4787a69efbe0fcd81228781b3c91dfe198aa0f1b (diff)
parent7f88009394e72395aa7a458ae442b0c3037dbd15 (diff)
downloadbootstrap-e9199718d64dadc22d61b4cea8c77a2307455823.tar.xz
bootstrap-e9199718d64dadc22d61b4cea8c77a2307455823.zip
Merge branch 'master' into fix-12154
Conflicts: dist/css/bootstrap.css.map dist/css/bootstrap.min.css docs/dist/css/bootstrap.css.map docs/dist/css/bootstrap.min.css
Diffstat (limited to 'less')
-rw-r--r--less/.csscomb.json2
-rw-r--r--less/badges.less4
-rw-r--r--less/button-groups.less6
-rw-r--r--less/carousel.less6
-rw-r--r--less/dropdowns.less2
-rw-r--r--less/forms.less54
-rw-r--r--less/mixins.less34
-rw-r--r--less/modals.less7
-rw-r--r--less/navbar.less10
-rw-r--r--less/normalize.less261
-rw-r--r--less/panels.less131
-rw-r--r--less/popovers.less14
-rw-r--r--less/print.less4
-rw-r--r--less/responsive-utilities.less13
-rw-r--r--less/scaffolding.less19
-rw-r--r--less/thumbnails.less2
-rw-r--r--less/type.less56
-rw-r--r--less/variables.less52
18 files changed, 375 insertions, 302 deletions
diff --git a/less/.csscomb.json b/less/.csscomb.json
index 53ea6eff3..c3d0c088b 100644
--- a/less/.csscomb.json
+++ b/less/.csscomb.json
@@ -91,6 +91,8 @@
"text-shadow",
"text-transform",
"text-wrap",
+ "-webkit-text-size-adjust",
+ "-ms-text-size-adjust",
"letter-spacing",
"-ms-word-break",
"word-break",
diff --git a/less/badges.less b/less/badges.less
index 166b2be5e..56828cab7 100644
--- a/less/badges.less
+++ b/less/badges.less
@@ -28,6 +28,10 @@
position: relative;
top: -1px;
}
+ .btn-xs & {
+ top: 0;
+ padding: 1px 5px;
+ }
}
// Hover state, but only for links
diff --git a/less/button-groups.less b/less/button-groups.less
index 58fd90675..27eb796b8 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -96,9 +96,9 @@
//
// Remix the default button sizing classes into new ones for easier manipulation.
-.btn-group-xs > .btn { .btn-xs(); }
-.btn-group-sm > .btn { .btn-sm(); }
-.btn-group-lg > .btn { .btn-lg(); }
+.btn-group-xs > .btn { &:extend(.btn-xs); }
+.btn-group-sm > .btn { &:extend(.btn-sm); }
+.btn-group-lg > .btn { &:extend(.btn-lg); }
// Split button dropdowns
diff --git a/less/carousel.less b/less/carousel.less
index e53365df4..e3fb8a2cf 100644
--- a/less/carousel.less
+++ b/less/carousel.less
@@ -21,7 +21,7 @@
// Account for jankitude on images
> img,
> a > img {
- .img-responsive();
+ &:extend(.img-responsive);
line-height: 1;
}
}
@@ -206,8 +206,8 @@
// Scale up the controls a smidge
.carousel-control {
- .glyphicons-chevron-left,
- .glyphicons-chevron-right,
+ .glyphicon-chevron-left,
+ .glyphicon-chevron-right,
.icon-prev,
.icon-next {
width: 30px;
diff --git a/less/dropdowns.less b/less/dropdowns.less
index dde2038e3..f165165e7 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -47,7 +47,7 @@
// Aligns the dropdown menu to right
//
- // Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]`
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
&.pull-right {
right: 0;
left: auto;
diff --git a/less/forms.less b/less/forms.less
index 6b475ae13..f607b8509 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -11,6 +11,10 @@ fieldset {
padding: 0;
margin: 0;
border: 0;
+ // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,
+ // so we reset that to ensure it behaves more like a standard block element.
+ // See https://github.com/twbs/bootstrap/issues/12359.
+ min-width: 0;
}
legend {
@@ -33,6 +37,10 @@ label {
// Normalize form controls
+//
+// While most of our form styles require extra classes, some basic normalization
+// is required to ensure optimum display with or without those classes to better
+// address browser inconsistencies.
// Override content-box in Normalize (* isn't specific enough)
input[type="search"] {
@@ -64,13 +72,6 @@ select[size] {
height: auto;
}
-// Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611
-select optgroup {
- font-size: inherit;
- font-style: inherit;
- font-family: inherit;
-}
-
// Focus for file, radio, and checkbox
input[type="file"]:focus,
input[type="radio"]:focus,
@@ -78,16 +79,6 @@ input[type="checkbox"]:focus {
.tab-focus();
}
-// Fix for Chrome number input
-// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button.
-// See https://github.com/twbs/bootstrap/issues/8350 for more.
-input[type="number"] {
- &::-webkit-outer-spin-button,
- &::-webkit-inner-spin-button {
- height: auto;
- }
-}
-
// Adjust output element
output {
display: block;
@@ -139,20 +130,19 @@ output {
.form-control-focus();
// Placeholder
- //
- // Placeholder text gets special styles because when browsers invalidate entire
- // lines if it doesn't understand a selector/
.placeholder();
// Disabled and read-only inputs
- // Note: HTML5 says that controls under a fieldset > legend:first-child won't
- // be disabled if the fieldset is disabled. Due to implementation difficulty,
- // we don't honor that edge case; we style them as disabled anyway.
+ //
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
+ // don't honor that edge case; we style them as disabled anyway.
&[disabled],
&[readonly],
fieldset[disabled] & {
cursor: not-allowed;
background-color: @input-bg-disabled;
+ opacity: 1; // iOS fix for unreadable disabled content
}
// Reset height for `textarea`s
@@ -161,10 +151,24 @@ output {
}
}
+
+// Search inputs in iOS
+//
+// This overrides the extra rounded corners on search inputs in iOS so that our
+// `.form-control` class can properly style them. Note that this cannot simply
+// be added to `.form-control` as it's not specific enough. For details, see
+// https://github.com/twbs/bootstrap/issues/11586.
+
+input[type="search"] {
+ -webkit-appearance: none;
+}
+
+
// 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;
}
@@ -345,6 +349,10 @@ input[type="checkbox"],
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}
+ // Input groups need that 100% width though
+ .input-group > .form-control {
+ width: 100%;
+ }
.control-label {
margin-bottom: 0;
diff --git a/less/mixins.less b/less/mixins.less
index 3af3c8208..9643d92a3 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -54,8 +54,7 @@
// Placeholder text
.placeholder(@color: @input-color-placeholder) {
- &:-moz-placeholder { color: @color; } // Firefox 4-18
- &::-moz-placeholder { color: @color; // Firefox 19+
+ &::-moz-placeholder { color: @color; // Firefox
opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome
@@ -115,6 +114,10 @@
}
// Drop shadows
+//
+// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
+// supported browsers that have box shadow capabilities now support the
+// standard `box-shadow` property.
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
@@ -249,7 +252,6 @@
-webkit-user-select: @select;
-moz-user-select: @select;
-ms-user-select: @select; // IE10+
- -o-user-select: @select;
user-select: @select;
}
@@ -577,6 +579,24 @@
}
}
+// Contextual backgrounds
+// -------------------------
+.bg-variant(@color) {
+ background-color: @color;
+ a&:hover {
+ background-color: darken(@color, 10%);
+ }
+}
+
+// Typography
+// -------------------------
+.text-emphasis-variant(@color) {
+ color: @color;
+ a&:hover {
+ color: darken(@color, 10%);
+ }
+}
+
// Navbar vertical align
// -------------------------
// Vertically center elements in the navbar.
@@ -607,10 +627,7 @@
}
.responsive-invisibility() {
- &,
- tr&,
- th&,
- td& { display: none !important; }
+ display: none !important;
}
@@ -897,7 +914,8 @@
line-height: @input-height;
}
- textarea& {
+ textarea&,
+ select[multiple]& {
height: auto;
}
}
diff --git a/less/modals.less b/less/modals.less
index f6ab34769..21cdee0f4 100644
--- a/less/modals.less
+++ b/less/modals.less
@@ -121,10 +121,9 @@
// Scale up the modal
@media (min-width: @screen-sm-min) {
-
// Automatically set modal's width for larger viewports
.modal-dialog {
- width: 600px;
+ width: @modal-md;
margin: 30px auto;
}
.modal-content {
@@ -133,6 +132,8 @@
// Modal sizes
.modal-sm { width: @modal-sm; }
- .modal-lg { width: @modal-lg; }
+}
+@media (min-width: @screen-md-min) {
+ .modal-lg { width: @modal-lg; }
}
diff --git a/less/navbar.less b/less/navbar.less
index ac7a6a79f..8c4c210b2 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -48,7 +48,7 @@
// content for the user's viewport.
.navbar-collapse {
- max-height: 340px;
+ max-height: @navbar-collapse-max-height;
overflow-x: visible;
padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal;
@@ -155,19 +155,13 @@
padding: @navbar-padding-vertical @navbar-padding-horizontal;
font-size: @font-size-large;
line-height: @line-height-computed;
+ height: @navbar-height;
&:hover,
&:focus {
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 & {
diff --git a/less/normalize.less b/less/normalize.less
index 42a393fc0..024e257c1 100644
--- a/less/normalize.less
+++ b/less/normalize.less
@@ -1,6 +1,25 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
+
+//
+// 1. Set default font family to sans-serif.
+// 2. Prevent iOS text size adjust after orientation change, without disabling
+// user zoom.
+//
+
+html {
+ font-family: sans-serif; // 1
+ -ms-text-size-adjust: 100%; // 2
+ -webkit-text-size-adjust: 100%; // 2
+}
+
+//
+// Remove default margin.
+//
+
+body {
+ margin: 0;
+}
-// ==========================================================================
// HTML5 display definitions
// ==========================================================================
@@ -24,13 +43,16 @@ summary {
}
//
-// Correct `inline-block` display not defined in IE 8/9.
+// 1. Correct `inline-block` display not defined in IE 8/9.
+// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
//
audio,
canvas,
+progress,
video {
- display: inline-block;
+ display: inline-block; // 1
+ vertical-align: baseline; // 2
}
//
@@ -53,31 +75,6 @@ template {
display: none;
}
-// ==========================================================================
-// Base
-// ==========================================================================
-
-//
-// 1. Set default font family to sans-serif.
-// 2. Prevent iOS text size adjust after orientation change, without disabling
-// user zoom.
-//
-
-html {
- font-family: sans-serif; // 1
- -ms-text-size-adjust: 100%; // 2
- -webkit-text-size-adjust: 100%; // 2
-}
-
-//
-// Remove default margin.
-//
-
-body {
- margin: 0;
-}
-
-// ==========================================================================
// Links
// ==========================================================================
@@ -90,14 +87,6 @@ a {
}
//
-// Address `outline` inconsistency between Chrome and other browsers.
-//
-
-a:focus {
- outline: thin dotted;
-}
-
-//
// Improve readability when focused and also mouse hovered in all browsers.
//
@@ -106,19 +95,8 @@ a:hover {
outline: 0;
}
+// Text-level semantics
// ==========================================================================
-// Typography
-// ==========================================================================
-
-//
-// Address variable `h1` font-size and margin within `section` and `article`
-// contexts in Firefox 4+, Safari 5, and Chrome.
-//
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
//
// Address styling not present in IE 8/9, Safari 5, and Chrome.
@@ -146,13 +124,13 @@ dfn {
}
//
-// Address differences between Firefox and other browsers.
+// Address variable `h1` font-size and margin within `section` and `article`
+// contexts in Firefox 4+, Safari 5, and Chrome.
//
-hr {
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- height: 0;
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
}
//
@@ -165,34 +143,6 @@ mark {
}
//
-// Correct font family set oddly in Safari 5 and Chrome.
-//
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, serif;
- font-size: 1em;
-}
-
-//
-// Improve readability of pre-formatted text in all browsers.
-//
-
-pre {
- white-space: pre-wrap;
-}
-
-//
-// Set consistent quote types.
-//
-
-q {
- quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-//
// Address inconsistent and variable font size in all browsers.
//
@@ -220,7 +170,6 @@ sub {
bottom: -0.25em;
}
-// ==========================================================================
// Embedded content
// ==========================================================================
@@ -240,8 +189,7 @@ svg:not(:root) {
overflow: hidden;
}
-// ==========================================================================
-// Figures
+// Grouping content
// ==========================================================================
//
@@ -249,63 +197,77 @@ svg:not(:root) {
//
figure {
- margin: 0;
+ margin: 1em 40px;
}
-// ==========================================================================
-// Forms
-// ==========================================================================
+//
+// Address differences between Firefox and other browsers.
+//
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
//
-// Define consistent border, margin, and padding.
+// Contain overflow in all browsers.
//
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
+pre {
+ overflow: auto;
}
//
-// 1. Correct `color` not being inherited in IE 8/9.
-// 2. Remove padding so people aren't caught out if they zero out fieldsets.
+// Address odd `em`-unit font size rendering in all browsers.
//
-legend {
- border: 0; // 1
- padding: 0; // 2
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
}
+// Forms
+// ==========================================================================
+
+//
+// Known limitation: by default, Chrome and Safari on OS X allow very limited
+// styling of `select`, unless a `border` property is set.
+//
+
//
-// 1. Correct font family not being inherited in all browsers.
-// 2. Correct font size not being inherited in all browsers.
+// 1. Correct color not being inherited.
+// Known issue: affects color of disabled elements.
+// 2. Correct font properties not being inherited.
// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
//
button,
input,
+optgroup,
select,
textarea {
- font-family: inherit; // 1
- font-size: 100%; // 2
+ color: inherit; // 1
+ font: inherit; // 2
margin: 0; // 3
}
//
-// Address Firefox 4+ setting `line-height` on `input` using `!important` in
-// the UA stylesheet.
+// Address `overflow` set to `hidden` in IE 8/9/10.
//
-button,
-input {
- line-height: normal;
+button {
+ overflow: visible;
}
//
// Address inconsistent `text-transform` inheritance for `button` and `select`.
// All other form control elements do not inherit `text-transform` values.
-// Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
-// Correct `select` style inheritance in Firefox 4+ and Opera.
+// Correct `button` style inheritance in Firefox, IE 8+, and Opera
+// Correct `select` style inheritance in Firefox.
//
button,
@@ -339,6 +301,28 @@ html input[disabled] {
}
//
+// Remove inner padding and border in Firefox 4+.
+//
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+//
+// Address Firefox 4+ setting `line-height` on `input` using `!important` in
+// the UA stylesheet.
+//
+
+input {
+ line-height: normal;
+}
+
+//
+// It's recommended that you don't attempt to style these elements.
+// Firefox's implementation doesn't respect box-sizing, padding, or width.
+//
// 1. Address box sizing set to `content-box` in IE 8/9/10.
// 2. Remove excess padding in IE 8/9/10.
//
@@ -350,6 +334,17 @@ input[type="radio"] {
}
//
+// Fix the cursor style for Chrome's increment/decrement buttons. For certain
+// `font-size` values of the `input`, it causes the cursor style of the
+// decrement button to change from `default` to `text`.
+//
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+//
// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
// (include `-moz` to future-proof).
@@ -363,8 +358,9 @@ input[type="search"] {
}
//
-// Remove inner padding and search cancel button in Safari 5 and Chrome
-// on OS X.
+// Remove inner padding and search cancel button in Safari and Chrome on OS X.
+// Safari (but not Chrome) clips the cancel button when the search input has
+// padding (and `textfield` appearance).
//
input[type="search"]::-webkit-search-cancel-button,
@@ -373,26 +369,42 @@ input[type="search"]::-webkit-search-decoration {
}
//
-// Remove inner padding and border in Firefox 4+.
+// Define consistent border, margin, and padding.
//
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
}
//
-// 1. Remove default vertical scrollbar in IE 8/9.
-// 2. Improve readability and alignment in all browsers.
+// 1. Correct `color` not being inherited in IE 8/9.
+// 2. Remove padding so people aren't caught out if they zero out fieldsets.
+//
+
+legend {
+ border: 0; // 1
+ padding: 0; // 2
+}
+
+//
+// Remove default vertical scrollbar in IE 8/9.
//
textarea {
- overflow: auto; // 1
- vertical-align: top; // 2
+ overflow: auto;
+}
+
+//
+// Don't inherit the `font-weight` (applied by a rule above).
+// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+//
+
+optgroup {
+ font-weight: bold;
}
-// ==========================================================================
// Tables
// ==========================================================================
@@ -404,3 +416,8 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
+
+td,
+th {
+ padding: 0;
+} \ No newline at end of file
diff --git a/less/panels.less b/less/panels.less
index a19fa3788..475784575 100644
--- a/less/panels.less
+++ b/less/panels.less
@@ -18,6 +18,37 @@
&:extend(.clearfix all);
}
+// Optional heading
+.panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ .border-top-radius((@panel-border-radius - 1));
+
+ > .dropdown .dropdown-toggle {
+ color: inherit;
+ }
+}
+
+// Within heading, strip any `h*` tag of its default margins for spacing.
+.panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: ceil((@font-size-base * 1.125));
+ color: inherit;
+
+ > a {
+ color: inherit;
+ }
+}
+
+// Optional footer (stays gray in every modifier class)
+.panel-footer {
+ padding: 10px 15px;
+ background-color: @panel-footer-bg;
+ border-top: 1px solid @panel-inner-border;
+ .border-bottom-radius((@panel-border-radius - 1));
+}
+
// List groups in panels
//
@@ -27,19 +58,28 @@
.panel {
> .list-group {
margin-bottom: 0;
-
.list-group-item {
border-width: 1px 0;
-
- // Remove border radius for top one
+ border-radius: 0;
&:first-child {
- .border-top-radius(0);
+ border-top: 0;
}
- // But keep it for the last one
&:last-child {
border-bottom: 0;
}
}
+ // Add border top radius for first one
+ &:first-child {
+ .list-group-item:first-child {
+ .border-top-radius((@panel-border-radius - 1));
+ }
+ }
+ // Add border bottom radius for last one
+ &:last-child {
+ .list-group-item:last-child {
+ .border-bottom-radius((@panel-border-radius - 1));
+ }
+ }
}
}
// Collapse space between when there's no additional content.
@@ -59,7 +99,31 @@
> .table,
> .table-responsive > .table {
margin-bottom: 0;
-
+ }
+ // Add border top radius for first one
+ > .table:first-child,
+ > .table-responsive:first-child > .table:first-child {
+ .border-top-radius((@panel-border-radius - 1));
+
+ > thead:first-child,
+ > tbody:first-child {
+ > tr:first-child {
+ td:first-child,
+ th:first-child {
+ border-top-left-radius: (@panel-border-radius - 1);
+ }
+ td:last-child,
+ th:last-child {
+ border-top-right-radius: (@panel-border-radius - 1);
+ }
+ }
+ }
+ }
+ // Add border bottom radius for last one
+ > .table:last-child,
+ > .table-responsive:last-child > .table:last-child {
+ .border-bottom-radius((@panel-border-radius - 1));
+
> tbody:last-child,
> tfoot:last-child {
> tr:last-child {
@@ -78,8 +142,8 @@
> .panel-body + .table-responsive {
border-top: 1px solid @table-border-color;
}
- > .table > tbody:first-child th,
- > .table > tbody:first-child td {
+ > .table > tbody:first-child > tr:first-child th,
+ > .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
> .table-bordered,
@@ -97,9 +161,22 @@
> td:last-child {
border-right: 0;
}
-
- &:last-child > th,
- &:last-child > td {
+ }
+ }
+ > thead,
+ > tbody {
+ > tr:first-child {
+ > td,
+ > th {
+ border-bottom: 0;
+ }
+ }
+ }
+ > tbody,
+ > tfoot {
+ > tr:last-child {
+ > td,
+ > th {
border-bottom: 0;
}
}
@@ -112,38 +189,6 @@
}
-// Optional heading
-.panel-heading {
- padding: 10px 15px;
- border-bottom: 1px solid transparent;
- .border-top-radius((@panel-border-radius - 1));
-
- > .dropdown .dropdown-toggle {
- color: inherit;
- }
-}
-
-// Within heading, strip any `h*` tag of its default margins for spacing.
-.panel-title {
- margin-top: 0;
- margin-bottom: 0;
- font-size: ceil((@font-size-base * 1.125));
- color: inherit;
-
- > a {
- color: inherit;
- }
-}
-
-// Optional footer (stays gray in every modifier class)
-.panel-footer {
- padding: 10px 15px;
- background-color: @panel-footer-bg;
- border-top: 1px solid @panel-inner-border;
- .border-bottom-radius((@panel-border-radius - 1));
-}
-
-
// Collapsable panels (aka, accordion)
//
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
diff --git a/less/popovers.less b/less/popovers.less
index 345bb1a31..2a3f37b73 100644
--- a/less/popovers.less
+++ b/less/popovers.less
@@ -48,7 +48,7 @@
//
// .arrow is outer, .arrow:after is inner
-.popover .arrow {
+.popover > .arrow {
&,
&:after {
position: absolute;
@@ -59,16 +59,16 @@
border-style: solid;
}
}
-.popover .arrow {
+.popover > .arrow {
border-width: @popover-arrow-outer-width;
}
-.popover .arrow:after {
+.popover > .arrow:after {
border-width: @popover-arrow-width;
content: "";
}
.popover {
- &.top .arrow {
+ &.top > .arrow {
left: 50%;
margin-left: -@popover-arrow-outer-width;
border-bottom-width: 0;
@@ -83,7 +83,7 @@
border-top-color: @popover-arrow-color;
}
}
- &.right .arrow {
+ &.right > .arrow {
top: 50%;
left: -@popover-arrow-outer-width;
margin-top: -@popover-arrow-outer-width;
@@ -98,7 +98,7 @@
border-right-color: @popover-arrow-color;
}
}
- &.bottom .arrow {
+ &.bottom > .arrow {
left: 50%;
margin-left: -@popover-arrow-outer-width;
border-top-width: 0;
@@ -114,7 +114,7 @@
}
}
- &.left .arrow {
+ &.left > .arrow {
top: 50%;
right: -@popover-arrow-outer-width;
margin-top: -@popover-arrow-outer-width;
diff --git a/less/print.less b/less/print.less
index 07277a3ca..3655d0395 100644
--- a/less/print.less
+++ b/less/print.less
@@ -50,10 +50,6 @@
max-width: 100% !important;
}
- @page {
- margin: 2cm .5cm;
- }
-
p,
h2,
h3 {
diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less
index 5a31816af..027a26410 100644
--- a/less/responsive-utilities.less
+++ b/less/responsive-utilities.less
@@ -23,30 +23,29 @@
// Visibility utilities
-.visible-xs {
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
.responsive-invisibility();
+}
+.visible-xs {
@media (max-width: @screen-xs-max) {
.responsive-visibility();
}
}
.visible-sm {
- .responsive-invisibility();
-
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility();
}
}
.visible-md {
- .responsive-invisibility();
-
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility();
}
}
.visible-lg {
- .responsive-invisibility();
-
@media (min-width: @screen-lg-min) {
.responsive-visibility();
}
diff --git a/less/scaffolding.less b/less/scaffolding.less
index 976b4e3c2..fe29f2d62 100644
--- a/less/scaffolding.less
+++ b/less/scaffolding.less
@@ -4,8 +4,13 @@
// Reset the box-sizing
-
-*,
+//
+// Heads up! This reset may cause conflicts with some third-party widgets.
+// For recommendations on resolving such conflicts, see
+// http://getbootstrap.com/getting-started/#third-box-sizing
+* {
+ .box-sizing(border-box);
+}
*:before,
*:after {
.box-sizing(border-box);
@@ -56,6 +61,16 @@ a {
}
+// Figures
+//
+// We reset this here because previously Normalize had no `figure` margins. This
+// ensures we don't break anyone's use of the element.
+
+figure {
+ margin: 0;
+}
+
+
// Images
img {
diff --git a/less/thumbnails.less b/less/thumbnails.less
index 11aa283a0..c428920bc 100644
--- a/less/thumbnails.less
+++ b/less/thumbnails.less
@@ -16,7 +16,7 @@
> img,
a > img {
- .img-responsive();
+ &:extend(.img-responsive);
margin-left: auto;
margin-right: auto;
}
diff --git a/less/type.less b/less/type.less
index 91496dc8c..ca574edc8 100644
--- a/less/type.less
+++ b/less/type.less
@@ -92,34 +92,19 @@ cite { font-style: normal; }
color: @text-muted;
}
.text-primary {
- color: @brand-primary;
- &:hover {
- color: darken(@brand-primary, 10%);
- }
+ .text-emphasis-variant(@brand-primary);
}
.text-success {
- color: @state-success-text;
- &:hover {
- color: darken(@state-success-text, 10%);
- }
+ .text-emphasis-variant(@state-success-text);
}
.text-info {
- color: @state-info-text;
- &:hover {
- color: darken(@state-info-text, 10%);
- }
+ .text-emphasis-variant(@state-info-text);
}
.text-warning {
- color: @state-warning-text;
- &:hover {
- color: darken(@state-warning-text, 10%);
- }
+ .text-emphasis-variant(@state-warning-text);
}
.text-danger {
- color: @state-danger-text;
- &:hover {
- color: darken(@state-danger-text, 10%);
- }
+ .text-emphasis-variant(@state-danger-text);
}
// Contextual backgrounds
@@ -129,34 +114,19 @@ cite { font-style: normal; }
// Given the contrast here, this is the only class to have its color inverted
// automatically.
color: #fff;
- background-color: @brand-primary;
- a&:hover {
- background-color: darken(@brand-primary, 10%);
- }
+ .bg-variant(@brand-primary);
}
.bg-success {
- background-color: @state-success-bg;
- a&:hover {
- background-color: darken(@state-success-bg, 10%);
- }
+ .bg-variant(@state-success-bg);
}
.bg-info {
- background-color: @state-info-bg;
- a&:hover {
- background-color: darken(@state-info-bg, 10%);
- }
+ .bg-variant(@state-info-bg);
}
.bg-warning {
- background-color: @state-warning-bg;
- a&:hover {
- background-color: darken(@state-warning-bg, 10%);
- }
+ .bg-variant(@state-warning-bg);
}
.bg-danger {
- background-color: @state-danger-bg;
- a&:hover {
- background-color: darken(@state-danger-bg, 10%);
- }
+ .bg-variant(@state-danger-bg);
}
@@ -263,7 +233,7 @@ abbr[data-original-title] {
blockquote {
padding: (@line-height-computed / 2) @line-height-computed;
margin: 0 0 @line-height-computed;
- font-size: (@font-size-base * 1.25);
+ font-size: @blockquote-font-size;
border-left: 5px solid @blockquote-border-color;
p,
@@ -274,7 +244,7 @@ blockquote {
}
}
- // Deprecating small and .small for v3.1
+ // Note: Deprecated small and .small as of v3.1.0
// Context: https://github.com/twbs/bootstrap/issues/11660
footer,
small,
@@ -292,7 +262,7 @@ blockquote {
// Opposite alignment of blockquote
//
-// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.
+// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
diff --git a/less/variables.less b/less/variables.less
index 106a73457..729da7cc9 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -58,7 +58,7 @@
//** Unit-less `line-height` for use in components like buttons.
@line-height-base: 1.428571429; // 20/14
-//** Computed "line-height" (`font-size` &times; `line-height`) for use with `margin`, `padding`, etc.
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
//** By default, this inherits from the `<body>`.
@@ -74,7 +74,7 @@
@icon-font-path: "../fonts/";
@icon-font-name: "glyphicons-halflings-regular";
-@icon-font-svg-id: "glyphicons_halflingsregular";
+@icon-font-svg-id: "glyphicons_halflingsregular";
//== Components
//
@@ -232,7 +232,7 @@
//** Text color for headers within dropdown menus.
@dropdown-header-color: @gray-light;
-// Note: Deprecated @dropdown-caret-color as of v3.1
+// Note: Deprecated @dropdown-caret-color as of v3.1.0
@dropdown-caret-color: #000;
@@ -301,6 +301,26 @@
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+@container-tablet: ((720px + @grid-gutter-width));
+//** For `@screen-sm-min` and up.
+@container-sm: @container-tablet;
+
+// Medium screen / desktop
+@container-desktop: ((940px + @grid-gutter-width));
+//** For `@screen-md-min` and up.
+@container-md: @container-desktop;
+
+// Large screen / wide desktop
+@container-large-desktop: ((1140px + @grid-gutter-width));
+//** For `@screen-lg-min` and up.
+@container-lg: @container-large-desktop;
+
+
//== Navbar
//
//##
@@ -311,6 +331,7 @@
@navbar-border-radius: @border-radius-base;
@navbar-padding-horizontal: floor((@grid-gutter-width / 2));
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
+@navbar-collapse-max-height: 340px;
@navbar-default-color: #777;
@navbar-default-bg: #f8f8f8;
@@ -548,7 +569,7 @@
@modal-content-bg: #fff;
//** Modal content border color
@modal-content-border-color: rgba(0,0,0,.2);
-//** Modal content border color <strong>for IE8</strong>
+//** Modal content border color **for IE8**
@modal-content-fallback-border-color: #999;
//** Modal backdrop background color
@@ -561,6 +582,7 @@
@modal-footer-border-color: @modal-header-border-color;
@modal-lg: 900px;
+@modal-md: 600px;
@modal-sm: 300px;
@@ -788,6 +810,8 @@
@headings-small-color: @gray-light;
//** Blockquote small color
@blockquote-small-color: @gray-light;
+//** Blockquote font size
+@blockquote-font-size: (@font-size-base * 1.25);
//** Blockquote border color
@blockquote-border-color: @gray-lighter;
//** Page header border color
@@ -803,23 +827,3 @@
//** Horizontal offset for forms and lists.
@component-offset-horizontal: 180px;
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet: ((720px + @grid-gutter-width));
-//** For `@screen-sm-min` and up.
-@container-sm: @container-tablet;
-
-// Medium screen / desktop
-@container-desktop: ((940px + @grid-gutter-width));
-//** For `@screen-md-min` and up.
-@container-md: @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop: ((1140px + @grid-gutter-width));
-//** For `@screen-lg-min` and up.
-@container-lg: @container-large-desktop;