From 8414922306bc0038651a88f6c29c7c27e749f081 Mon Sep 17 00:00:00 2001 From: "Ewe Seong, Yeoh" Date: Wed, 27 Jul 2022 14:29:04 +0800 Subject: [PATCH 1/3] fix: replace deprecated shorthand --- scss/bootstrap-core/_custom-forms.scss | 41 +++++++++++++++----------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/scss/bootstrap-core/_custom-forms.scss b/scss/bootstrap-core/_custom-forms.scss index 079c177..4eaed88 100644 --- a/scss/bootstrap-core/_custom-forms.scss +++ b/scss/bootstrap-core/_custom-forms.scss @@ -2,12 +2,11 @@ // Released under MIT and copyright 2014 Waybury. // https://useiconic.com/open - // Checkboxes and radios // // Base class takes care of all the key behavioral aspects. -@use "sass:list"; +@use 'sass:list'; .custom-control { position: relative; @@ -15,7 +14,7 @@ display: block; min-height: $font-size-base * $line-height-base; padding-left: $custom-control-gutter + $custom-control-indicator-size; - color-adjust: exact; // Keep themed appearance for print + print-color-adjust: exact; // Keep themed appearance for print } .custom-control-inline { @@ -91,7 +90,7 @@ width: $custom-control-indicator-size; height: $custom-control-indicator-size; pointer-events: none; - content: ""; + content: ''; background-color: $custom-control-indicator-bg; border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width; @include box-shadow($custom-control-indicator-box-shadow); @@ -105,12 +104,11 @@ display: block; width: $custom-control-indicator-size; height: $custom-control-indicator-size; - content: ""; + content: ''; background: no-repeat list.slash(50%, $custom-control-indicator-bg-size); } } - // Checkboxes // // Tweak just a few things for checkboxes. @@ -170,7 +168,6 @@ } } - // switches // // Tweak a few things for switches @@ -188,14 +185,17 @@ } &::after { - top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) * 0.5, $custom-control-indicator-border-width * 2); + top: add( + ($font-size-base * $line-height-base - $custom-control-indicator-size) * 0.5, + $custom-control-indicator-border-width * 2 + ); left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2); width: $custom-switch-indicator-size; height: $custom-switch-indicator-size; background-color: $custom-control-indicator-border-color; // stylelint-disable-next-line property-disallowed-list border-radius: $custom-switch-indicator-border-radius; - @include transition(transform .15s ease-in-out, $custom-forms-transition); + @include transition(transform 0.15s ease-in-out, $custom-forms-transition); } } @@ -213,7 +213,6 @@ } } - // Select // // Replaces the browser default select with a custom one, mostly pulled from @@ -224,7 +223,8 @@ display: inline-block; width: 100%; height: $custom-select-height; - padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; + padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) + $custom-select-padding-y $custom-select-padding-x; font-family: $custom-select-font-family; @include font-size($custom-select-font-size); font-weight: $custom-select-font-weight; @@ -259,7 +259,7 @@ } &[multiple], - &[size]:not([size="1"]) { + &[size]:not([size='1']) { height: auto; padding-right: $custom-select-padding-x; background-image: none; @@ -298,7 +298,6 @@ @include font-size($custom-select-font-size-lg); } - // File // // Custom file input. @@ -369,7 +368,7 @@ padding: $custom-file-padding-y $custom-file-padding-x; line-height: $custom-file-line-height; color: $custom-file-button-color; - content: "Browse"; + content: 'Browse'; @include gradient-bg($custom-file-button-bg); border-left: inherit; @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0); @@ -394,9 +393,15 @@ // Pseudo-elements must be split across multiple rulesets to have an effect. // No box-shadow() mixin for focus accessibility. - &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } - &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } - &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } + &::-webkit-slider-thumb { + box-shadow: $custom-range-thumb-focus-box-shadow; + } + &::-moz-range-thumb { + box-shadow: $custom-range-thumb-focus-box-shadow; + } + &::-ms-thumb { + box-shadow: $custom-range-thumb-focus-box-shadow; + } } &::-moz-focus-outer { @@ -461,7 +466,7 @@ height: $custom-range-thumb-height; margin-top: 0; // Edge specific margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. - margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. + margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. @include gradient-bg($custom-range-thumb-bg); border: $custom-range-thumb-border; @include border-radius($custom-range-thumb-border-radius); From a2fadc53fcf6a261be56e15c138d059ae7ba74b0 Mon Sep 17 00:00:00 2001 From: "Ewe Seong, Yeoh" Date: Wed, 27 Jul 2022 14:35:57 +0800 Subject: [PATCH 2/3] Revert "fix: replace deprecated shorthand" This reverts commit 8414922306bc0038651a88f6c29c7c27e749f081. --- scss/bootstrap-core/_custom-forms.scss | 41 +++++++++++--------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/scss/bootstrap-core/_custom-forms.scss b/scss/bootstrap-core/_custom-forms.scss index 4eaed88..079c177 100644 --- a/scss/bootstrap-core/_custom-forms.scss +++ b/scss/bootstrap-core/_custom-forms.scss @@ -2,11 +2,12 @@ // Released under MIT and copyright 2014 Waybury. // https://useiconic.com/open + // Checkboxes and radios // // Base class takes care of all the key behavioral aspects. -@use 'sass:list'; +@use "sass:list"; .custom-control { position: relative; @@ -14,7 +15,7 @@ display: block; min-height: $font-size-base * $line-height-base; padding-left: $custom-control-gutter + $custom-control-indicator-size; - print-color-adjust: exact; // Keep themed appearance for print + color-adjust: exact; // Keep themed appearance for print } .custom-control-inline { @@ -90,7 +91,7 @@ width: $custom-control-indicator-size; height: $custom-control-indicator-size; pointer-events: none; - content: ''; + content: ""; background-color: $custom-control-indicator-bg; border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width; @include box-shadow($custom-control-indicator-box-shadow); @@ -104,11 +105,12 @@ display: block; width: $custom-control-indicator-size; height: $custom-control-indicator-size; - content: ''; + content: ""; background: no-repeat list.slash(50%, $custom-control-indicator-bg-size); } } + // Checkboxes // // Tweak just a few things for checkboxes. @@ -168,6 +170,7 @@ } } + // switches // // Tweak a few things for switches @@ -185,17 +188,14 @@ } &::after { - top: add( - ($font-size-base * $line-height-base - $custom-control-indicator-size) * 0.5, - $custom-control-indicator-border-width * 2 - ); + top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) * 0.5, $custom-control-indicator-border-width * 2); left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2); width: $custom-switch-indicator-size; height: $custom-switch-indicator-size; background-color: $custom-control-indicator-border-color; // stylelint-disable-next-line property-disallowed-list border-radius: $custom-switch-indicator-border-radius; - @include transition(transform 0.15s ease-in-out, $custom-forms-transition); + @include transition(transform .15s ease-in-out, $custom-forms-transition); } } @@ -213,6 +213,7 @@ } } + // Select // // Replaces the browser default select with a custom one, mostly pulled from @@ -223,8 +224,7 @@ display: inline-block; width: 100%; height: $custom-select-height; - padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) - $custom-select-padding-y $custom-select-padding-x; + padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; font-family: $custom-select-font-family; @include font-size($custom-select-font-size); font-weight: $custom-select-font-weight; @@ -259,7 +259,7 @@ } &[multiple], - &[size]:not([size='1']) { + &[size]:not([size="1"]) { height: auto; padding-right: $custom-select-padding-x; background-image: none; @@ -298,6 +298,7 @@ @include font-size($custom-select-font-size-lg); } + // File // // Custom file input. @@ -368,7 +369,7 @@ padding: $custom-file-padding-y $custom-file-padding-x; line-height: $custom-file-line-height; color: $custom-file-button-color; - content: 'Browse'; + content: "Browse"; @include gradient-bg($custom-file-button-bg); border-left: inherit; @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0); @@ -393,15 +394,9 @@ // Pseudo-elements must be split across multiple rulesets to have an effect. // No box-shadow() mixin for focus accessibility. - &::-webkit-slider-thumb { - box-shadow: $custom-range-thumb-focus-box-shadow; - } - &::-moz-range-thumb { - box-shadow: $custom-range-thumb-focus-box-shadow; - } - &::-ms-thumb { - box-shadow: $custom-range-thumb-focus-box-shadow; - } + &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } + &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } + &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; } } &::-moz-focus-outer { @@ -466,7 +461,7 @@ height: $custom-range-thumb-height; margin-top: 0; // Edge specific margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. - margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. + margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden. @include gradient-bg($custom-range-thumb-bg); border: $custom-range-thumb-border; @include border-radius($custom-range-thumb-border-radius); From 9302ac56e1708006b361288ffe78891b8b6d3c59 Mon Sep 17 00:00:00 2001 From: "Ewe Seong, Yeoh" Date: Wed, 27 Jul 2022 14:36:58 +0800 Subject: [PATCH 3/3] fix: replace deprecated shorthand --- scss/bootstrap-core/_custom-forms.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/bootstrap-core/_custom-forms.scss b/scss/bootstrap-core/_custom-forms.scss index 079c177..4df2e1b 100644 --- a/scss/bootstrap-core/_custom-forms.scss +++ b/scss/bootstrap-core/_custom-forms.scss @@ -15,7 +15,7 @@ display: block; min-height: $font-size-base * $line-height-base; padding-left: $custom-control-gutter + $custom-control-indicator-size; - color-adjust: exact; // Keep themed appearance for print + print-color-adjust: exact; // Keep themed appearance for print } .custom-control-inline {