diff options
| author | Mark Otto <[email protected]> | 2015-06-19 16:26:33 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2015-06-19 16:26:33 -0700 |
| commit | bc29c016b7afefa2a9a42e94efaee58695049285 (patch) | |
| tree | ac294f7fbc18d4ba8c6b4179b7d1cbeb6481d70b /scss | |
| parent | 8410afe0e104459a613f6232ad46334aa8b99fda (diff) | |
| parent | 3df2d085ed219a16848b96e90a72fcd5575a5270 (diff) | |
| download | bootstrap-bc29c016b7afefa2a9a42e94efaee58695049285.tar.xz bootstrap-bc29c016b7afefa2a9a42e94efaee58695049285.zip | |
Merge branch 'v4' into v4_builds
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/.csslintrc | 20 | ||||
| -rw-r--r-- | scss/_badge.scss | 3 | ||||
| -rw-r--r-- | scss/_button-group.scss | 4 | ||||
| -rw-r--r-- | scss/_buttons.scss | 8 | ||||
| -rw-r--r-- | scss/_card.scss | 2 | ||||
| -rw-r--r-- | scss/_carousel.scss | 3 | ||||
| -rw-r--r-- | scss/_forms.scss | 44 | ||||
| -rw-r--r-- | scss/_input-group.scss | 1 | ||||
| -rw-r--r-- | scss/_list-group.scss | 9 | ||||
| -rw-r--r-- | scss/_media.scss | 5 | ||||
| -rw-r--r-- | scss/_mixins.scss | 1 | ||||
| -rw-r--r-- | scss/_normalize.scss | 19 | ||||
| -rw-r--r-- | scss/_pagination.scss | 4 | ||||
| -rw-r--r-- | scss/_popover.scss | 12 | ||||
| -rw-r--r-- | scss/_responsive-embed.scss | 9 | ||||
| -rw-r--r-- | scss/_tooltip.scss | 8 | ||||
| -rw-r--r-- | scss/_variables.scss | 5 | ||||
| -rw-r--r-- | scss/bootstrap-flex.scss | 2 | ||||
| -rw-r--r-- | scss/mixins/_list-group.scss | 3 | ||||
| -rw-r--r-- | scss/mixins/_pagination.scss | 3 | ||||
| -rw-r--r-- | scss/mixins/_reset-text.scss | 18 |
21 files changed, 101 insertions, 82 deletions
diff --git a/scss/.csslintrc b/scss/.csslintrc deleted file mode 100644 index 19ceb82e9..000000000 --- a/scss/.csslintrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "adjoining-classes": false, - "box-sizing": false, - "box-model": false, - "compatible-vendor-prefixes": false, - "fallback-colors": false, - "floats": false, - "font-sizes": false, - "gradients": false, - "important": false, - "known-properties": false, - "outline-none": false, - "qualified-headings": false, - "regex-selectors": false, - "shorthand": false, - "text-indent": false, - "unique-headings": false, - "universal-selector": false, - "unqualified-attributes": false -} diff --git a/scss/_badge.scss b/scss/_badge.scss index 53781160a..e842cea30 100644 --- a/scss/_badge.scss +++ b/scss/_badge.scss @@ -11,10 +11,11 @@ padding-left: .6em; font-size: .75em; font-weight: $badge-font-weight; - color: $badge-color; line-height: $line-height-base; + color: $badge-color; text-align: center; white-space: nowrap; + vertical-align: middle; background-color: $badge-bg; @include border-radius($badge-border-radius); diff --git a/scss/_button-group.scss b/scss/_button-group.scss index 187166b00..96c3cc565 100644 --- a/scss/_button-group.scss +++ b/scss/_button-group.scss @@ -183,11 +183,11 @@ border-radius: 0; } &:first-child:not(:last-child) { - border-top-right-radius: $border-radius-base; + border-top-right-radius: $btn-border-radius-base; @include border-bottom-radius(0); } &:last-child:not(:first-child) { - border-bottom-left-radius: $border-radius-base; + border-bottom-left-radius: $btn-border-radius-base; @include border-top-radius(0); } } diff --git a/scss/_buttons.scss b/scss/_buttons.scss index addc7b246..23a5b8a77 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -17,7 +17,7 @@ cursor: pointer; user-select: none; border: $border-width solid transparent; - @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $border-radius-base); + @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base); transition: all .2s ease-in-out; &, @@ -130,14 +130,14 @@ fieldset[disabled] a.btn { .btn-lg { // line-height: ensure even-numbered height of button next to large input - @include button-size($padding-lg-vertical, $padding-lg-horizontal, $font-size-lg, $line-height-lg, $border-radius-lg); + @include button-size($padding-lg-vertical, $padding-lg-horizontal, $font-size-lg, $line-height-lg, $btn-border-radius-lg); } .btn-sm { // line-height: ensure proper height of button next to small input - @include button-size($padding-sm-vertical, $padding-sm-horizontal, $font-size-sm, $line-height-sm, $border-radius-sm); + @include button-size($padding-sm-vertical, $padding-sm-horizontal, $font-size-sm, $line-height-sm, $btn-border-radius-sm); } .btn-xs { - @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-xs, $line-height-sm, $border-radius-sm); + @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-xs, $line-height-sm, $btn-border-radius-sm); } diff --git a/scss/_card.scss b/scss/_card.scss index 8809ec5c5..b0bac74e1 100644 --- a/scss/_card.scss +++ b/scss/_card.scss @@ -198,8 +198,8 @@ $card-cap-bg: #f5f5f5; .card { flex: 1 0 0; - margin-left: .625rem; margin-right: .625rem; + margin-left: .625rem; } } } @else { diff --git a/scss/_carousel.scss b/scss/_carousel.scss index 25d0650cf..8eb4cdd26 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -29,7 +29,7 @@ @media all and (transform-3d), (-webkit-transform-3d) { transition: transform .6s ease-in-out; backface-visibility: hidden; - perspective: 1000; + perspective: 1000px; &.next, &.active.right { @@ -144,6 +144,7 @@ right: 50%; margin-right: -10px; } + .icon-prev { &:before { content: "\2039";// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) diff --git a/scss/_forms.scss b/scss/_forms.scss index 78ca70295..7cdf54125 100644 --- a/scss/_forms.scss +++ b/scss/_forms.scss @@ -33,6 +33,12 @@ height: $input-height-base; } + // Unstyle the caret on `<select>`s in IE10+. + &::-ms-expand { + background-color: transparent; + border: 0; + } + // Customize the `:focus` state to imitate native WebKit styles. @include form-control-focus(); @@ -91,24 +97,26 @@ // set a pixel line-height that matches the given height of the input, but only // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 -// @media screen and (-webkit-min-device-pixel-ratio: 0) { -// input[type="date"], -// input[type="time"], -// input[type="datetime-local"], -// input[type="month"] { -// line-height: $input-height-base; - -// &.input-sm, -// .input-group-sm & { -// line-height: $input-height-sm; -// } - -// &.input-lg, -// .input-group-lg & { -// line-height: $input-height-lg; -// } -// } -// } +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + &.form-control { + line-height: $input-height-base; + } + + &.input-sm, + .input-group-sm &.form-control { + line-height: $input-height-sm; + } + + &.input-lg, + .input-group-lg &.form-control { + line-height: $input-height-lg; + } + } +} // Static form control text diff --git a/scss/_input-group.scss b/scss/_input-group.scss index 30786ae01..8d1a238c7 100644 --- a/scss/_input-group.scss +++ b/scss/_input-group.scss @@ -179,6 +179,7 @@ &:last-child { > .btn, > .btn-group { + z-index: 2; margin-left: -1px; } } diff --git a/scss/_list-group.scss b/scss/_list-group.scss index 0dd7afb82..a6c133729 100644 --- a/scss/_list-group.scss +++ b/scss/_list-group.scss @@ -45,12 +45,13 @@ } -// Linked list items +// Interactive list items // -// Use anchor elements instead of `li`s or `div`s to create linked list items. -// Includes an extra `.active` modifier class for showing selected items. +// Use anchor or button elements instead of `li`s or `div`s to create interactive +// list items. Includes an extra `.active` modifier class for selected items. -a.list-group-item { +a.list-group-item, +button.list-group-item { color: $list-group-link-color; .list-group-item-heading { diff --git a/scss/_media.scss b/scss/_media.scss index afa50b9b3..f4093f138 100644 --- a/scss/_media.scss +++ b/scss/_media.scss @@ -47,6 +47,11 @@ .media-object { display: block; + + // Fix collapse in webkit from max-width: 100% and display: table-cell. + &.img-thumbnail { + max-width: none; + } } diff --git a/scss/_mixins.scss b/scss/_mixins.scss index 57450eeb2..41ddd122c 100644 --- a/scss/_mixins.scss +++ b/scss/_mixins.scss @@ -35,6 +35,7 @@ @import "mixins/screen-reader"; @import "mixins/size"; @import "mixins/tab-focus"; +@import "mixins/reset-text"; @import "mixins/text-emphasis"; @import "mixins/text-truncate"; diff --git a/scss/_normalize.scss b/scss/_normalize.scss index e49b5281c..2e62b53ec 100644 --- a/scss/_normalize.scss +++ b/scss/_normalize.scss @@ -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 { @@ -213,7 +214,6 @@ figure { // hr { - -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } @@ -354,15 +354,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/scss/_pagination.scss b/scss/_pagination.scss index 381ffe6d6..d52bda41b 100644 --- a/scss/_pagination.scss +++ b/scss/_pagination.scss @@ -79,9 +79,9 @@ // .pagination-lg { - @include pagination-size($padding-lg-vertical, $padding-lg-horizontal, $font-size-lg, $border-radius-lg); + @include pagination-size($padding-lg-vertical, $padding-lg-horizontal, $font-size-lg, $line-height-lg, $border-radius-lg); } .pagination-sm { - @include pagination-size($padding-sm-vertical, $padding-sm-horizontal, $font-size-sm, $border-radius-sm); + @include pagination-size($padding-sm-vertical, $padding-sm-horizontal, $font-size-sm, $line-height-sm, $border-radius-sm); } diff --git a/scss/_popover.scss b/scss/_popover.scss index f0152ccf6..0439a1cf1 100644 --- a/scss/_popover.scss +++ b/scss/_popover.scss @@ -11,14 +11,10 @@ display: block; max-width: $popover-max-width; padding: 1px; - // Reset font and text properties given new insertion method - font-family: $font-family-base; - font-size: $font-size-base; - font-weight: normal; - line-height: $line-height-base; - text-align: left; - // Overrides for proper insertion - white-space: normal; + // 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. + @include reset-text(); + font-size: $font-size-sm; background-color: $popover-bg; background-clip: padding-box; border: 1px solid $popover-border-color; diff --git a/scss/_responsive-embed.scss b/scss/_responsive-embed.scss index c1ef6cb4b..772b853c7 100644 --- a/scss/_responsive-embed.scss +++ b/scss/_responsive-embed.scss @@ -26,12 +26,17 @@ } } +// Modifier class for 21:9 aspect ratio +.embed-responsive-21by9 { + padding-bottom: percentage(9 / 21); +} + // Modifier class for 16:9 aspect ratio .embed-responsive-16by9 { - padding-bottom: 56.25%; + padding-bottom: percentage(9 / 16); } // Modifier class for 4:3 aspect ratio .embed-responsive-4by3 { - padding-bottom: 75%; + padding-bottom: percentage(3 / 4); } diff --git a/scss/_tooltip.scss b/scss/_tooltip.scss index 7b15fe5a3..7093f956c 100644 --- a/scss/_tooltip.scss +++ b/scss/_tooltip.scss @@ -8,11 +8,10 @@ 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. + @include reset-text(); font-size: $font-size-sm; - font-weight: normal; - line-height: 1.4; opacity: 0; &.in { opacity: $tooltip-opacity; } @@ -77,7 +76,6 @@ padding: 3px 8px; color: $tooltip-color; text-align: center; - text-decoration: none; background-color: $tooltip-bg; @include border-radius($border-radius-base); } diff --git a/scss/_variables.scss b/scss/_variables.scss index 346c3c184..5b8b1c55e 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -169,6 +169,11 @@ $btn-danger-border: darken($btn-danger-bg, 5%) !default; $btn-link-disabled-color: $gray-light !default; +// Allows for customizing button radius independently from global border radius +$btn-border-radius-base: $border-radius-base; +$btn-border-radius-lg: $border-radius-lg; +$btn-border-radius-sm: $border-radius-sm; + // Forms diff --git a/scss/bootstrap-flex.scss b/scss/bootstrap-flex.scss index 892cda67e..60dd03a68 100644 --- a/scss/bootstrap-flex.scss +++ b/scss/bootstrap-flex.scss @@ -5,4 +5,4 @@ $enable-flex: true; -@import "bootstrap.scss"; +@import "bootstrap"; diff --git a/scss/mixins/_list-group.scss b/scss/mixins/_list-group.scss index 1f17729b0..a40dda96d 100644 --- a/scss/mixins/_list-group.scss +++ b/scss/mixins/_list-group.scss @@ -6,7 +6,8 @@ background-color: $background; } - a.list-group-item-#{state} { + a.list-group-item-#{state}, + button.list-group-item-#{state} { color: $color; .list-group-item-heading { diff --git a/scss/mixins/_pagination.scss b/scss/mixins/_pagination.scss index 43fff6863..d4a5404fc 100644 --- a/scss/mixins/_pagination.scss +++ b/scss/mixins/_pagination.scss @@ -1,11 +1,12 @@ // Pagination -@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) { +@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) { > li { > a, > span { padding: $padding-vertical $padding-horizontal; font-size: $font-size; + line-height: $line-height; } &:first-child { > a, diff --git a/scss/mixins/_reset-text.scss b/scss/mixins/_reset-text.scss new file mode 100644 index 000000000..c78db0314 --- /dev/null +++ b/scss/mixins/_reset-text.scss @@ -0,0 +1,18 @@ +@mixin 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; +} |
