From dec3ea6a7f18e9127a771492e55ad2b94ab03e2a Mon Sep 17 00:00:00 2001 From: Catalin Zalog Date: Sat, 28 Mar 2020 22:01:37 +0200 Subject: Order sizes variables (#30479) --- scss/_variables.scss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scss') diff --git a/scss/_variables.scss b/scss/_variables.scss index 21b497784..31ca7f71a 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -320,13 +320,13 @@ $border-width: 1px !default; $border-color: $gray-300 !default; $border-radius: .25rem !default; -$border-radius-lg: .3rem !default; $border-radius-sm: .2rem !default; +$border-radius-lg: .3rem !default; $rounded-pill: 50rem !default; -$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; $box-shadow: 0 .5rem 1rem rgba($black, .15) !default; +$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; $box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; $box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default; @@ -374,8 +374,8 @@ $font-family-base: $font-family-sans-serif !default; // $font-size-base effects the font size of the body text $font-size-root: null !default; $font-size-base: 1rem !default; // Assumes the browser default, typically `16px` -$font-size-lg: $font-size-base * 1.25 !default; $font-size-sm: $font-size-base * .875 !default; +$font-size-lg: $font-size-base * 1.25 !default; $font-weight-lighter: lighter !default; $font-weight-light: 300 !default; @@ -386,8 +386,8 @@ $font-weight-bolder: bolder !default; $font-weight-base: $font-weight-normal !default; $line-height-base: 1.5 !default; -$line-height-lg: 2 !default; $line-height-sm: 1.25 !default; +$line-height-lg: 2 !default; $h1-font-size: $font-size-base * 2.5 !default; $h2-font-size: $font-size-base * 2 !default; @@ -549,8 +549,8 @@ $btn-block-spacing-y: .5rem !default; // Allows for customizing button radius independently from global border radius $btn-border-radius: $border-radius !default; -$btn-border-radius-lg: $border-radius-lg !default; $btn-border-radius-sm: $border-radius-sm !default; +$btn-border-radius-lg: $border-radius-lg !default; $btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; @@ -584,8 +584,8 @@ $input-border-width: $input-btn-border-width !default; $input-box-shadow: $box-shadow-inset !default; $input-border-radius: $border-radius !default; -$input-border-radius-lg: $border-radius-lg !default; $input-border-radius-sm: $border-radius-sm !default; +$input-border-radius-lg: $border-radius-lg !default; $input-focus-bg: $input-bg !default; $input-focus-border-color: lighten($component-active-bg, 25%) !default; @@ -1055,10 +1055,10 @@ $modal-header-padding-y: 1rem !default; $modal-header-padding-x: 1rem !default; $modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility -$modal-xl: 1140px !default; -$modal-lg: 800px !default; -$modal-md: 500px !default; $modal-sm: 300px !default; +$modal-md: 500px !default; +$modal-lg: 800px !default; +$modal-xl: 1140px !default; $modal-fade-transform: translate(0, -50px) !default; $modal-show-transform: none !default; -- cgit v1.2.3 From 841412626633a89b8ba7910a683b7e0830fd4d2d Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Mon, 30 Mar 2020 15:12:36 +0200 Subject: Switch to custom properties to control grid gutter widths (#30475) --- scss/_grid.scss | 34 ---------------------------------- scss/mixins/_grid.scss | 27 +++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 38 deletions(-) (limited to 'scss') diff --git a/scss/_grid.scss b/scss/_grid.scss index e4e3c9796..5686f31fe 100644 --- a/scss/_grid.scss +++ b/scss/_grid.scss @@ -12,40 +12,6 @@ } } -// Gutters -// -// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns. - -@if $enable-grid-classes { - @each $breakpoint in map-keys($grid-breakpoints) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - - @include media-breakpoint-up($breakpoint, $grid-breakpoints) { - - @each $key, $value in $gutters { - .g#{$infix}-#{$key}, - .gx#{$infix}-#{$key} { - margin-right: -$value / 2; - margin-left: -$value / 2; - - > * { - padding-right: $value / 2; - padding-left: $value / 2; - } - } - - .g#{$infix}-#{$key}, - .gy#{$infix}-#{$key} { - margin-top: -$value; - - > * { - margin-top: $value; - } - } - } - } - } -} // Columns // diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index 35283207d..aba7dcb58 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -3,10 +3,13 @@ // Generate semantic grid columns with these mixins. @mixin make-row($gutter: $grid-gutter-width) { + --grid-gutter-x: #{$gutter}; + --grid-gutter-y: 0; display: flex; flex-wrap: wrap; - margin-right: -$gutter / 2; - margin-left: -$gutter / 2; + margin-top: calc(var(--grid-gutter-y) * -1); // stylelint-disable-line function-blacklist + margin-right: calc(var(--grid-gutter-x) / -2); // stylelint-disable-line function-blacklist + margin-left: calc(var(--grid-gutter-x) / -2); // stylelint-disable-line function-blacklist } @mixin make-col-ready($gutter: $grid-gutter-width) { @@ -18,8 +21,9 @@ flex-shrink: 0; width: 100%; max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid - padding-right: $gutter / 2; - padding-left: $gutter / 2; + padding-right: calc(var(--grid-gutter-x) / 2); // stylelint-disable-line function-blacklist + padding-left: calc(var(--grid-gutter-x) / 2); // stylelint-disable-line function-blacklist + margin-top: var(--grid-gutter-y); } @mixin make-col($size, $columns: $grid-columns) { @@ -93,6 +97,21 @@ } } } + + // Gutters + // + // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns. + @each $key, $value in $gutters { + .g#{$infix}-#{$key}, + .gx#{$infix}-#{$key} { + --grid-gutter-x: #{$value}; + } + + .g#{$infix}-#{$key}, + .gy#{$infix}-#{$key} { + --grid-gutter-y: #{$value}; + } + } } } } -- cgit v1.2.3 From 22a535641b9f2f7d3fce291ab446f1a73ae23557 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 31 Mar 2020 10:33:05 +0200 Subject: Cleanup responsive tables (#30482) --- scss/_tables.scss | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'scss') diff --git a/scss/_tables.scss b/scss/_tables.scss index cb5fc8421..253282c98 100644 --- a/scss/_tables.scss +++ b/scss/_tables.scss @@ -174,23 +174,14 @@ // Generate series of `.table-responsive-*` classes for configuring the screen // size of where your table will overflow. -.table-responsive { - @each $breakpoint in map-keys($grid-breakpoints) { - $next: breakpoint-next($breakpoint, $grid-breakpoints); - $infix: breakpoint-infix($next, $grid-breakpoints); - - &#{$infix} { - @include media-breakpoint-down($breakpoint) { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; - - // Prevent double border on horizontal scroll due to use of `display: block;` - > .table-bordered { - border: 0; - } - } +@each $breakpoint in map-keys($grid-breakpoints) { + $next: breakpoint-next($breakpoint, $grid-breakpoints); + $infix: breakpoint-infix($next, $grid-breakpoints); + + @include media-breakpoint-down($breakpoint) { + .table-responsive#{$infix} { + overflow-x: auto; + -webkit-overflow-scrolling: touch; } } } -- cgit v1.2.3 From a1b5a64fba5435f387162825e920d98627aedff3 Mon Sep 17 00:00:00 2001 From: Yannik Hampe Date: Tue, 31 Mar 2020 14:51:50 +0200 Subject: Use variables for list-group-item color levels (#30009) Co-authored-by: Martijn Cuppens --- scss/_list-group.scss | 2 +- scss/_variables.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'scss') diff --git a/scss/_list-group.scss b/scss/_list-group.scss index a7fa9f702..99ec43be8 100644 --- a/scss/_list-group.scss +++ b/scss/_list-group.scss @@ -157,5 +157,5 @@ // Organizationally, this must come after the `:hover` states. @each $color, $value in $theme-colors { - @include list-group-item-variant($color, color-level($value, -9), color-level($value, 6)); + @include list-group-item-variant($color, color-level($value, $list-group-item-bg-level), color-level($value, $list-group-item-color-level)); } diff --git a/scss/_variables.scss b/scss/_variables.scss index 31ca7f71a..9312c0be4 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -1105,6 +1105,8 @@ $list-group-border-radius: $border-radius !default; $list-group-item-padding-y: .75rem !default; $list-group-item-padding-x: 1.25rem !default; +$list-group-item-bg-level: -9 !default; +$list-group-item-color-level: 6 !default; $list-group-hover-bg: $gray-100 !default; $list-group-active-color: $component-active-color !default; -- cgit v1.2.3 From df707cd7272f9165dda895f08bdd15d093d96a25 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 31 Mar 2020 20:02:57 +0200 Subject: Require `.form-label` classes on form labels (#30476) --- scss/_button-group.scss | 2 -- scss/_list-group.scss | 1 - scss/_reboot.scss | 1 - scss/_variables.scss | 6 +++++- scss/forms/_form-check.scss | 1 - scss/forms/_input-group.scss | 1 - scss/forms/_labels.scss | 13 ++++++++++++- 7 files changed, 17 insertions(+), 8 deletions(-) (limited to 'scss') diff --git a/scss/_button-group.scss b/scss/_button-group.scss index e486d469d..e3d2e4cc4 100644 --- a/scss/_button-group.scss +++ b/scss/_button-group.scss @@ -149,8 +149,6 @@ .btn-group-toggle { > .btn, > .btn-group > .btn { - margin-bottom: 0; // Override default `