diff options
| author | Zac Echola <[email protected]> | 2015-04-28 09:45:16 -0500 |
|---|---|---|
| committer | Zac Echola <[email protected]> | 2015-04-28 09:45:16 -0500 |
| commit | 407e8dc9d8d8e28d456a37d9d69e1d3c89d6fbb4 (patch) | |
| tree | d841221f51dd9852fbce1c562127158d35b8812d /less | |
| parent | e46c998316359f3368d80736d7eb750d85dc4da5 (diff) | |
| parent | e6438592e9ea28324ba1a4344e724cab28032208 (diff) | |
| download | bootstrap-407e8dc9d8d8e28d456a37d9d69e1d3c89d6fbb4.tar.xz bootstrap-407e8dc9d8d8e28d456a37d9d69e1d3c89d6fbb4.zip | |
Merge branch 'master' of https://github.com/twbs/bootstrap into list_group_buttons
Diffstat (limited to 'less')
| -rw-r--r-- | less/badges.less | 2 | ||||
| -rw-r--r-- | less/button-groups.less | 1 | ||||
| -rw-r--r-- | less/carousel.less | 2 | ||||
| -rw-r--r-- | less/dropdowns.less | 1 | ||||
| -rw-r--r-- | less/forms.less | 19 | ||||
| -rw-r--r-- | less/input-groups.less | 1 | ||||
| -rw-r--r-- | less/media.less | 5 | ||||
| -rw-r--r-- | less/mixins.less | 1 | ||||
| -rw-r--r-- | less/mixins/grid-framework.less | 4 | ||||
| -rw-r--r-- | less/mixins/grid.less | 4 | ||||
| -rw-r--r-- | less/mixins/reset-text.less | 18 | ||||
| -rw-r--r-- | less/normalize.less | 19 | ||||
| -rw-r--r-- | less/pagination.less | 1 | ||||
| -rw-r--r-- | less/panels.less | 6 | ||||
| -rw-r--r-- | less/popovers.less | 12 | ||||
| -rw-r--r-- | less/print.less | 6 | ||||
| -rw-r--r-- | less/scaffolding.less | 3 | ||||
| -rw-r--r-- | less/theme.less | 21 | ||||
| -rw-r--r-- | less/tooltip.less | 9 |
19 files changed, 85 insertions, 50 deletions
diff --git a/less/badges.less b/less/badges.less index c70bb939e..6ee16dca4 100644 --- a/less/badges.less +++ b/less/badges.less @@ -12,7 +12,7 @@ font-weight: @badge-font-weight; color: @badge-color; line-height: @badge-line-height; - vertical-align: baseline; + vertical-align: middle; white-space: nowrap; text-align: center; background-color: @badge-bg; diff --git a/less/button-groups.less b/less/button-groups.less index 13c1800de..84443c88b 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -36,6 +36,7 @@ margin-left: -5px; // Offset the first child's margin &:extend(.clearfix all); + .btn, .btn-group, .input-group { float: left; diff --git a/less/carousel.less b/less/carousel.less index 4bbe946d3..6458297c6 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -29,7 +29,7 @@ @media all and (transform-3d), (-webkit-transform-3d) { .transition-transform(~'0.6s ease-in-out'); .backface-visibility(~'hidden'); - .perspective(1000); + .perspective(1000px); &.next, &.active.right { diff --git a/less/dropdowns.less b/less/dropdowns.less index af344607b..f47a4bce8 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -11,6 +11,7 @@ margin-left: 2px; vertical-align: middle; border-top: @caret-width-base dashed; + border-top: @caret-width-base ~"solid\9"; // IE8 border-right: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent; } diff --git a/less/forms.less b/less/forms.less index 94c0e7fce..cea6f669b 100644 --- a/less/forms.less +++ b/less/forms.less @@ -56,7 +56,6 @@ input[type="checkbox"] { line-height: normal; } -// Set the height of file controls to match text inputs input[type="file"] { display: block; } @@ -338,10 +337,10 @@ input[type="checkbox"] { } .form-control-static { height: @input-height-small; - padding: @padding-small-vertical @padding-small-horizontal; + min-height: (@line-height-computed + @font-size-small); + padding: (@padding-small-vertical + 1) @padding-small-horizontal; font-size: @font-size-small; line-height: @line-height-small; - min-height: (@line-height-computed + @font-size-small); } } @@ -366,10 +365,10 @@ input[type="checkbox"] { } .form-control-static { height: @input-height-large; - padding: @padding-large-vertical @padding-large-horizontal; + min-height: (@line-height-computed + @font-size-large); + padding: (@padding-large-vertical + 1) @padding-large-horizontal; font-size: @font-size-large; line-height: @line-height-large; - min-height: (@line-height-computed + @font-size-large); } } @@ -401,13 +400,15 @@ input[type="checkbox"] { pointer-events: none; } .input-lg + .form-control-feedback, -.input-group-lg + .form-control-feedback { +.input-group-lg + .form-control-feedback, +.form-group-lg .form-control + .form-control-feedback { width: @input-height-large; height: @input-height-large; line-height: @input-height-large; } .input-sm + .form-control-feedback, -.input-group-sm + .form-control-feedback { +.input-group-sm + .form-control-feedback, +.form-group-sm .form-control + .form-control-feedback { width: @input-height-small; height: @input-height-small; line-height: @input-height-small; @@ -576,7 +577,7 @@ input[type="checkbox"] { // Reposition the icon because it's now within a grid column and columns have // `position: relative;` on them. Also accounts for the grid gutter padding. .has-feedback .form-control-feedback { - right: (@grid-gutter-width / 2); + right: floor((@grid-gutter-width / 2)); } // Form group sizes @@ -587,6 +588,7 @@ input[type="checkbox"] { @media (min-width: @screen-sm-min) { .control-label { padding-top: ((@padding-large-vertical * @line-height-large) + 1); + font-size: @font-size-large; } } } @@ -594,6 +596,7 @@ input[type="checkbox"] { @media (min-width: @screen-sm-min) { .control-label { padding-top: (@padding-small-vertical + 1); + font-size: @font-size-small; } } } diff --git a/less/input-groups.less b/less/input-groups.less index a8712f25b..457ea60ba 100644 --- a/less/input-groups.less +++ b/less/input-groups.less @@ -160,6 +160,7 @@ &:last-child { > .btn, > .btn-group { + z-index: 2; margin-left: -1px; } } diff --git a/less/media.less b/less/media.less index a6bf78192..8c835e861 100644 --- a/less/media.less +++ b/less/media.less @@ -19,6 +19,11 @@ .media-object { display: block; + + // Fix collapse in webkit from max-width: 100% and display: table-cell. + &.img-thumbnail { + max-width: none; + } } .media-right, diff --git a/less/mixins.less b/less/mixins.less index af4408fc2..e6f9fe684 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -11,6 +11,7 @@ @import "mixins/responsive-visibility.less"; @import "mixins/size.less"; @import "mixins/tab-focus.less"; +@import "mixins/reset-text.less"; @import "mixins/text-emphasis.less"; @import "mixins/text-overflow.less"; @import "mixins/vendor-prefixes.less"; diff --git a/less/mixins/grid-framework.less b/less/mixins/grid-framework.less index f3b3929d6..8c23eed24 100644 --- a/less/mixins/grid-framework.less +++ b/less/mixins/grid-framework.less @@ -19,8 +19,8 @@ // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding - padding-left: (@grid-gutter-width / 2); - padding-right: (@grid-gutter-width / 2); + padding-left: ceil((@grid-gutter-width / 2)); + padding-right: floor((@grid-gutter-width / 2)); } } .col(1); // kickstart it diff --git a/less/mixins/grid.less b/less/mixins/grid.less index cae5eaff9..f144c15f4 100644 --- a/less/mixins/grid.less +++ b/less/mixins/grid.less @@ -13,8 +13,8 @@ // Creates a wrapper for a series of columns .make-row(@gutter: @grid-gutter-width) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); + margin-left: ceil((@gutter / -2)); + margin-right: floor((@gutter / -2)); &:extend(.clearfix all); } diff --git a/less/mixins/reset-text.less b/less/mixins/reset-text.less new file mode 100644 index 000000000..58dd4d19b --- /dev/null +++ b/less/mixins/reset-text.less @@ -0,0 +1,18 @@ +.reset-text() { + font-family: @font-family-base; + // We deliberately do NOT reset font-size. + font-style: normal; + font-weight: normal; + letter-spacing: normal; + line-break: auto; + line-height: @line-height-base; + text-align: left; // Fallback for where `start` is not supported + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + white-space: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; +} diff --git a/less/normalize.less b/less/normalize.less index 62a085a48..9dddf73ad 100644 --- a/less/normalize.less +++ b/less/normalize.less @@ -1,9 +1,9 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ // // 1. Set default font family to sans-serif. -// 2. Prevent iOS text size adjust after orientation change, without disabling -// user zoom. +// 2. Prevent iOS and IE text size adjust after device orientation change, +// without disabling user zoom. // html { @@ -71,7 +71,7 @@ audio:not([controls]) { // // Address `[hidden]` styling not present in IE 8/9/10. -// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. +// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. // [hidden], @@ -91,7 +91,8 @@ a { } // -// Improve readability when focused and also mouse hovered in all browsers. +// Improve readability of focused elements when they are also in an +// active/hover state. // a:active, @@ -209,7 +210,6 @@ figure { // hr { - -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } @@ -350,15 +350,12 @@ input[type="number"]::-webkit-outer-spin-button { // // 1. Address `appearance` set to `searchfield` in Safari and Chrome. -// 2. Address `box-sizing` set to `border-box` in Safari and Chrome -// (include `-moz` to future-proof). +// 2. Address `box-sizing` set to `border-box` in Safari and Chrome. // input[type="search"] { -webkit-appearance: textfield; // 1 - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; // 2 - box-sizing: content-box; + box-sizing: content-box; //2 } // diff --git a/less/pagination.less b/less/pagination.less index 38c4c3d34..e94757338 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -40,6 +40,7 @@ > li > span { &:hover, &:focus { + z-index: 3; color: @pagination-hover-color; background-color: @pagination-hover-bg; border-color: @pagination-hover-border; diff --git a/less/panels.less b/less/panels.less index 04eb2b39c..425eb5e64 100644 --- a/less/panels.less +++ b/less/panels.less @@ -76,6 +76,7 @@ .border-top-radius((@panel-border-radius - 1)); } } + // Add border bottom radius for last one &:last-child { .list-group-item:last-child { @@ -84,6 +85,11 @@ } } } + > .panel-heading + .panel-collapse > .list-group { + .list-group-item:first-child { + .border-top-radius(0); + } + } } // Collapse space between when there's no additional content. .panel-heading + .list-group { diff --git a/less/popovers.less b/less/popovers.less index 2748eead1..3a62a6455 100644 --- a/less/popovers.less +++ b/less/popovers.less @@ -11,12 +11,11 @@ display: none; max-width: @popover-max-width; padding: 1px; - // Reset font and text properties given new insertion method - font-family: @font-family-base; + // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + .reset-text(); font-size: @font-size-base; - font-weight: normal; - line-height: @line-height-base; - text-align: left; + background-color: @popover-bg; background-clip: padding-box; border: 1px solid @popover-fallback-border-color; @@ -24,9 +23,6 @@ border-radius: @border-radius-large; .box-shadow(0 5px 10px rgba(0,0,0,.2)); - // Overrides for proper insertion - white-space: normal; - // Offset the popover to account for the popover arrow &.top { margin-top: -@popover-arrow-width; } &.right { margin-left: @popover-arrow-width; } diff --git a/less/print.less b/less/print.less index 94ca58f12..66e54ab48 100644 --- a/less/print.less +++ b/less/print.less @@ -67,12 +67,6 @@ } // Bootstrap specific changes start - // - // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 - // Once fixed, we can just straight up remove this. - select { - background: #fff !important; - } // Bootstrap components .navbar { diff --git a/less/scaffolding.less b/less/scaffolding.less index 47b1d5a1a..1929bfc5c 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -155,8 +155,7 @@ hr { // Fixes "clickability" issue (and more generally, the firing of events such as focus as well) // for traditionally non-focusable elements with role="button" // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile -// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged [role="button"] { cursor: pointer; -}
\ No newline at end of file +} diff --git a/less/theme.less b/less/theme.less index 6f2eb6212..afac3a8aa 100644 --- a/less/theme.less +++ b/less/theme.less @@ -28,6 +28,12 @@ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); } + &.disabled, + &[disabled], + fieldset[disabled] & { + .box-shadow(none); + } + .badge { text-shadow: none; } @@ -53,10 +59,17 @@ } &.disabled, - &:disabled, - &[disabled] { - background-color: darken(@btn-color, 12%); - background-image: none; + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &.focus, + &:active, + &.active { + background-color: darken(@btn-color, 12%); + background-image: none; + } } } diff --git a/less/tooltip.less b/less/tooltip.less index 9d5684743..b48d63e07 100644 --- a/less/tooltip.less +++ b/less/tooltip.less @@ -8,11 +8,11 @@ position: absolute; z-index: @zindex-tooltip; display: block; - // Reset font and text properties given new insertion method - font-family: @font-family-base; + // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + .reset-text(); font-size: @font-size-small; - font-weight: normal; - line-height: 1.4; + .opacity(0); &.in { .opacity(@tooltip-opacity); } @@ -28,7 +28,6 @@ padding: 3px 8px; color: @tooltip-color; text-align: center; - text-decoration: none; background-color: @tooltip-bg; border-radius: @border-radius-base; } |
