aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-02-08 16:01:56 -0800
committerMark Otto <[email protected]>2014-02-08 16:01:56 -0800
commite3cfd5821db94df0d6eb483d1f859da9dddd55a8 (patch)
tree8af2dc5a1442b8974ecc7809ca516f2c67fde39b /less
parent08ff305ed7ba689238d4524b0285d37d15aaf8fa (diff)
parent842af44fccb338f165eb2ea64bdaffd999850881 (diff)
downloadbootstrap-e3cfd5821db94df0d6eb483d1f859da9dddd55a8.tar.xz
bootstrap-e3cfd5821db94df0d6eb483d1f859da9dddd55a8.zip
Merge branch 'master' into pr/12462
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/button-groups.less6
-rw-r--r--less/carousel.less2
-rw-r--r--less/forms.less25
-rw-r--r--less/mixins.less4
-rw-r--r--less/panels.less83
-rw-r--r--less/thumbnails.less2
-rw-r--r--less/type.less2
-rw-r--r--less/variables.less42
8 files changed, 97 insertions, 69 deletions
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..2229d5553 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;
}
}
diff --git a/less/forms.less b/less/forms.less
index d0189d0cc..f607b8509 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -133,9 +133,10 @@ output {
.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] & {
@@ -150,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;
}
@@ -334,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 92fbf4bfe..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
@@ -253,7 +252,6 @@
-webkit-user-select: @select;
-moz-user-select: @select;
-ms-user-select: @select; // IE10+
- -o-user-select: @select;
user-select: @select;
}
diff --git a/less/panels.less b/less/panels.less
index 7896562cb..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
//
@@ -130,12 +161,22 @@
> td:last-child {
border-right: 0;
}
- &:first-child > th,
- &:first-child > td {
- border-top: 0;
+ }
+ }
+ > thead,
+ > tbody {
+ > tr:first-child {
+ > td,
+ > th {
+ border-bottom: 0;
}
- &:last-child > th,
- &:last-child > td {
+ }
+ }
+ > tbody,
+ > tfoot {
+ > tr:last-child {
+ > td,
+ > th {
border-bottom: 0;
}
}
@@ -148,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/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 a55730dfe..ca574edc8 100644
--- a/less/type.less
+++ b/less/type.less
@@ -233,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,
diff --git a/less/variables.less b/less/variables.less
index b06206dfb..729da7cc9 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -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
//
//##
@@ -790,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
@@ -805,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;