Skip to content

Commit

Permalink
(less) Merge branch 'master' into fix-8869
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Mar 10, 2014
2 parents ff6ca12 + f362530 commit 78b1f67
Show file tree
Hide file tree
Showing 21 changed files with 543 additions and 201 deletions.
4 changes: 2 additions & 2 deletions .csscomb.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"always-semicolon": true,
"block-indent": 2,
"colon-space": true,
"colon-space": [0, 1],
"color-case": "lower",
"color-shorthand": true,
"combinator-space": true,
Expand All @@ -10,7 +10,7 @@
"leading-zero": false,
"remove-empty-rulesets": true,
"rule-indent": 2,
"stick-brace": true,
"stick-brace": " ",
"strip-spaces": true,
"unitless-zero": true,
"vendor-prefix-align": true,
Expand Down
36 changes: 18 additions & 18 deletions badges.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// --------------------------------------------------


// Base classes
// Base class
.badge {
display: inline-block;
min-width: 10px;
Expand Down Expand Up @@ -32,24 +32,24 @@
top: 0;
padding: 1px 5px;
}
}

// Hover state, but only for links
a.badge {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
// Hover state, but only for links
a& {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
}

// Account for counters in navs
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
// Account for badges in navs
a.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.nav-pills > li > a > & {
margin-left: 3px;
}
}
5 changes: 3 additions & 2 deletions bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
@import "variables.less";
@import "mixins.less";

// Reset
// Reset and dependencies
@import "normalize.less";
@import "print.less";
@import "glyphicons.less";

// Core CSS
@import "scaffolding.less";
Expand All @@ -17,7 +18,6 @@

// Components
@import "component-animations.less";
@import "glyphicons.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
Expand All @@ -35,6 +35,7 @@
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";

Expand Down
12 changes: 11 additions & 1 deletion button-groups.less
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,17 @@


// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
// `required` attribute, we have to "hide" the inputs via `opacity`. We cannot
// use `display: none;` or `visibility: hidden;` as that also hides the popover.
// This way, we ensure a DOM element is visible to position the popover from.
//
// See https://github.com/twbs/bootstrap/pull/12794 for more.

[data-toggle="buttons"] > .btn > input[type="radio"],
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
display: none;
position: absolute;
z-index: -1;
opacity: 0;
}
1 change: 0 additions & 1 deletion code.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ code {
font-size: 90%;
color: @code-color;
background-color: @code-bg;
white-space: nowrap;
border-radius: @border-radius-base;
}

Expand Down
10 changes: 6 additions & 4 deletions component-animations.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Heads up!
//
// We don't use the `.opacity()` mixin here since it causes a bug with text
// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.

.fade {
opacity: 0;
Expand All @@ -17,10 +17,12 @@

.collapse {
display: none;
&.in {
display: block;
}

&.in { display: block; }
tr&.in { display: table-row; }
tbody&.in { display: table-row-group; }
}

.collapsing {
position: relative;
height: 0;
Expand Down
70 changes: 53 additions & 17 deletions forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ input[type="search"] {
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9; /* IE8-9 */
margin-top: 1px \9; // IE8-9
line-height: normal;
}

Expand Down Expand Up @@ -167,10 +167,20 @@ input[type="search"] {
// Special styles for iOS date input
//
// In Mobile Safari, date inputs require a pixel line-height that matches the
// given height of the input.
// given height of the input. Since this fucks up everything else, we have to
// appropriately reset it for Internet Explorer and the size variations.

input[type="date"] {
line-height: @input-height-base;
// IE8+ misaligns the text within date inputs, so we reset
line-height: @line-height-base ~"\0";

&.input-sm {
line-height: @input-height-small;
}
&.input-lg {
line-height: @input-height-large;
}
}


Expand Down Expand Up @@ -271,18 +281,27 @@ input[type="checkbox"],
.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 its margin
right: 0;
display: block;
width: @input-height-base;
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
}
}
// Feedback icon (requires .glyphicon classes)
.form-control-feedback {
position: absolute;
top: (@line-height-computed + 5); // Height of the `label` and its margin
right: 0;
display: block;
width: @input-height-base;
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
}
.input-lg + .form-control-feedback {
width: @input-height-large;
height: @input-height-large;
line-height: @input-height-large;
}
.input-sm + .form-control-feedback {
width: @input-height-small;
height: @input-height-small;
line-height: @input-height-small;
}

// Feedback states
Expand Down Expand Up @@ -349,6 +368,18 @@ input[type="checkbox"],
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}

.input-group {
display: inline-table;
vertical-align: middle;

.input-group-addon,
.input-group-btn,
.form-control {
width: auto;
}
}

// Input groups need that 100% width though
.input-group > .form-control {
width: 100%;
Expand Down Expand Up @@ -394,8 +425,9 @@ input[type="checkbox"],

.form-horizontal {

// Consistent vertical alignment of labels, radios, and checkboxes
.control-label,
// Consistent vertical alignment of radios and checkboxes
//
// Labels also get some reset styles, but that is scoped to a media query below.
.radio,
.checkbox,
.radio-inline,
Expand All @@ -418,12 +450,16 @@ input[type="checkbox"],

.form-control-static {
padding-top: (@padding-base-vertical + 1);
padding-bottom: (@padding-base-vertical + 1);
}

// Only right align form labels here when the columns stop stacking
// 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) {
.control-label {
text-align: right;
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
}

Expand Down
4 changes: 4 additions & 0 deletions jumbotron.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
font-weight: 200;
}

> hr {
border-top-color: darken(@jumbotron-bg, 10%);
}

.container & {
border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
}
Expand Down
2 changes: 1 addition & 1 deletion labels.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
border-radius: .25em;

// Add hover effects, but only for links
&[href] {
a& {
&:hover,
&:focus {
color: @label-link-hover-color;
Expand Down
19 changes: 19 additions & 0 deletions list-group.less
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,27 @@ a.list-group-item {
&:hover,
&:focus {
text-decoration: none;
color: @list-group-link-hover-color;
background-color: @list-group-hover-bg;
}
}

.list-group-item {
// Disabled state
&.disabled,
&.disabled:hover,
&.disabled:focus {
background-color: @list-group-disabled-bg;
color: @list-group-disabled-color;

// Force color to inherit for custom content
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: @list-group-disabled-text-color;
}
}

// Active class on item itself, not parent
&.active,
Expand Down
Loading

0 comments on commit 78b1f67

Please sign in to comment.