Skip to content

Commit f8e3fcd

Browse files
committed
Revert "Fix SCSS"
This reverts commit 791af53.
1 parent 791af53 commit f8e3fcd

20 files changed

+79
-108
lines changed

_sass/bootstrap/_card.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22
// Base styles
33
//
4-
@use "sass:math";
54

65
.card {
76
position: relative;
@@ -59,7 +58,7 @@
5958
}
6059

6160
.card-subtitle {
62-
margin-top: - (math.div($card-spacer-y, 2));
61+
margin-top: -$card-spacer-y / 2;
6362
margin-bottom: 0;
6463
}
6564

@@ -110,15 +109,15 @@
110109
//
111110

112111
.card-header-tabs {
113-
margin-right: - (math.div($card-spacer-x, 2));
112+
margin-right: -$card-spacer-x / 2;
114113
margin-bottom: -$card-spacer-y;
115-
margin-left: - (math.div($card-spacer-x, 2));
114+
margin-left: -$card-spacer-x / 2;
116115
border-bottom: 0;
117116
}
118117

119118
.card-header-pills {
120-
margin-right: - (math.div($card-spacer-x, 2));
121-
margin-left: - (math.div($card-spacer-x, 2));
119+
margin-right: -$card-spacer-x / 2;
120+
margin-left: -$card-spacer-x / 2;
122121
}
123122

124123
// Card image

_sass/bootstrap/_carousel.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// slide in its in-transition state. Only one of these occurs at a time.
1111
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
1212
// is the upcoming slide in transition.
13-
@use "sass:math";
1413

1514
.carousel {
1615
position: relative;

_sass/bootstrap/_custom-forms.scss

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Checkboxes and radios
77
//
88
// Base class takes care of all the key behavioral aspects.
9-
@use "sass:math";
109

1110
.custom-control {
1211
position: relative;
@@ -27,13 +26,13 @@
2726
left: 0;
2827
z-index: -1; // Put the input behind the label so it doesn't overlay text
2928
width: $custom-control-indicator-size;
30-
height: math.div(($font-size-base * $line-height-base + $custom-control-indicator-size), 2);
29+
height: ($font-size-base * $line-height-base + $custom-control-indicator-size) / 2;
3130
opacity: 0;
3231

3332
&:checked ~ .custom-control-label::before {
3433
color: $custom-control-indicator-checked-color;
3534
border-color: $custom-control-indicator-checked-border-color;
36-
height: math.div(($font-size-base * $line-height-base + $custom-control-indicator-size), 2);
35+
@include gradient-bg($custom-control-indicator-checked-bg);
3736
@include box-shadow($custom-control-indicator-checked-box-shadow);
3837
}
3938

@@ -84,7 +83,8 @@
8483
// Background-color and (when enabled) gradient
8584
&::before {
8685
position: absolute;
87-
top: math.div(($font-size-base * $line-height-base - $custom-control-indicator-size), 2);
86+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
87+
left: -($custom-control-gutter + $custom-control-indicator-size);
8888
display: block;
8989
width: $custom-control-indicator-size;
9090
height: $custom-control-indicator-size;
@@ -96,16 +96,15 @@
9696
}
9797

9898
// Foreground (icon)
99-
&::after {
99+
&::after {
100100
position: absolute;
101-
top: math.div(($font-size-base * $line-height-base - $custom-control-indicator-size), 2);
101+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
102+
left: -($custom-control-gutter + $custom-control-indicator-size);
102103
display: block;
103104
width: $custom-control-indicator-size;
104105
height: $custom-control-indicator-size;
105106
content: "";
106-
background-repeat: no-repeat;
107-
background-position: 50%;
108-
background-size: $custom-control-indicator-bg-size;
107+
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
109108
}
110109
}
111110

@@ -187,7 +186,7 @@
187186
}
188187

189188
&::after {
190-
top: add(math.div(($font-size-base * $line-height-base - $custom-control-indicator-size), 2), $custom-control-indicator-border-width * 2);
189+
top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2);
191190
left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
192191
width: $custom-switch-indicator-size;
193192
height: $custom-switch-indicator-size;
@@ -405,7 +404,7 @@
405404
&::-webkit-slider-thumb {
406405
width: $custom-range-thumb-width;
407406
height: $custom-range-thumb-height;
408-
margin-top: math.div($custom-range-track-height - $custom-range-thumb-height, 2); // Webkit specific
407+
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
409408
@include gradient-bg($custom-range-thumb-bg);
410409
border: $custom-range-thumb-border;
411410
@include border-radius($custom-range-thumb-border-radius);
@@ -480,7 +479,7 @@
480479
cursor: $custom-range-track-cursor;
481480
background-color: transparent;
482481
border-color: transparent;
483-
border-width: math.div($custom-range-thumb-height, 2);
482+
border-width: $custom-range-thumb-height / 2;
484483
@include box-shadow($custom-range-track-box-shadow);
485484
}
486485

_sass/bootstrap/_forms.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// stylelint-disable selector-no-qualifying-type
22

3-
@use "sass:math";
4-
53
//
64
// Textual form controls
75
//
@@ -201,13 +199,13 @@ textarea.form-control {
201199
.form-row {
202200
display: flex;
203201
flex-wrap: wrap;
204-
margin-right: - (math.div($form-grid-gutter-width, 2));
205-
margin-left: - (math.div($form-grid-gutter-width, 2));
202+
margin-right: -$form-grid-gutter-width / 2;
203+
margin-left: -$form-grid-gutter-width / 2;
206204

207205
> .col,
208206
> [class*="col-"] {
209-
padding-right: math.div($form-grid-gutter-width, 2);
210-
padding-left: math.div($form-grid-gutter-width, 2);
207+
padding-right: $form-grid-gutter-width / 2;
208+
padding-left: $form-grid-gutter-width / 2;
211209
}
212210
}
213211

_sass/bootstrap/_functions.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
// Ascending
66
// Used to evaluate Sass maps like our grid breakpoints.
7-
8-
@use "sass:math";
9-
107
@mixin _assert-ascending($map, $map-name) {
118
$prev-key: null;
129
$prev-num: null;
@@ -78,7 +75,7 @@
7875
$g: green($color);
7976
$b: blue($color);
8077

81-
$yiq: math.div(($r * 299) + ($g * 587) + ($b * 114), 1000);
78+
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
8279

8380
@if ($yiq >= $yiq-contrasted-threshold) {
8481
@return $dark;

_sass/bootstrap/_jumbotron.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
@use "sass:math";
21
.jumbotron {
3-
padding: $jumbotron-padding (math.div($jumbotron-padding, 2));
2+
padding: $jumbotron-padding ($jumbotron-padding / 2);
43
margin-bottom: $jumbotron-padding;
54
color: $jumbotron-color;
65
background-color: $jumbotron-bg;

_sass/bootstrap/_modal.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// .modal-dialog - positioning shell for the actual modal
44
// .modal-content - actual modal w/ bg and corners and stuff
55

6-
@use "sass:math";
6+
77
.modal-open {
88
// Kill the scroll on the body
99
overflow: hidden;
@@ -175,15 +175,15 @@
175175
flex-wrap: wrap;
176176
align-items: center; // vertically center
177177
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
178-
padding: $modal-inner-padding - math.div($modal-footer-margin-between, 2);
178+
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
179179
border-top: $modal-footer-border-width solid $modal-footer-border-color;
180180
@include border-bottom-radius($modal-content-inner-border-radius);
181181

182182
// Place margin between footer elements
183183
// This solution is far from ideal because of the universal selector usage,
184184
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
185185
> * {
186-
margin: math.div($modal-footer-margin-between, 2);
186+
margin: $modal-footer-margin-between / 2;
187187
}
188188
}
189189

_sass/bootstrap/_popover.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@use "sass:math";
21
.popover {
32
position: absolute;
43
top: 0;
@@ -44,13 +43,13 @@
4443

4544
&::before {
4645
bottom: 0;
47-
border-width: $popover-arrow-height math.div($popover-arrow-width, 2) 0;
46+
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
4847
border-top-color: $popover-arrow-outer-color;
4948
}
5049

5150
&::after {
5251
bottom: $popover-border-width;
53-
border-width: $popover-arrow-height math.div($popover-arrow-width, 2) 0;
52+
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
5453
border-top-color: $popover-arrow-color;
5554
}
5655
}
@@ -67,13 +66,13 @@
6766

6867
&::before {
6968
left: 0;
70-
border-width: math.div($popover-arrow-width, 2) $popover-arrow-height math.div($popover-arrow-width, 2) 0;
69+
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
7170
border-right-color: $popover-arrow-outer-color;
7271
}
7372

7473
&::after {
7574
left: $popover-border-width;
76-
border-width: math.div($popover-arrow-width, 2) $popover-arrow-height math.div($popover-arrow-width, 2) 0;
75+
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
7776
border-right-color: $popover-arrow-color;
7877
}
7978
}
@@ -87,13 +86,13 @@
8786

8887
&::before {
8988
top: 0;
90-
border-width: 0 math.div($popover-arrow-width, 2) $popover-arrow-height math.div($popover-arrow-width, 2);
89+
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
9190
border-bottom-color: $popover-arrow-outer-color;
9291
}
9392

9493
&::after {
9594
top: $popover-border-width;
96-
border-width: 0 math.div($popover-arrow-width, 2) $popover-arrow-height math.div($popover-arrow-width, 2);
95+
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
9796
border-bottom-color: $popover-arrow-color;
9897
}
9998
}
@@ -105,7 +104,7 @@
105104
left: 50%;
106105
display: block;
107106
width: $popover-arrow-width;
108-
margin-left: - (math.div($popover-arrow-width, 2));
107+
margin-left: -$popover-arrow-width / 2;
109108
content: "";
110109
border-bottom: $popover-border-width solid $popover-header-bg;
111110
}
@@ -122,13 +121,13 @@
122121

123122
&::before {
124123
right: 0;
125-
border-width: math.div($popover-arrow-width, 2) 0 math.div($popover-arrow-width, 2) $popover-arrow-height;
124+
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
126125
border-left-color: $popover-arrow-outer-color;
127126
}
128127

129128
&::after {
130129
right: $popover-border-width;
131-
border-width: math.div($popover-arrow-width, 2) 0 math.div($popover-arrow-width, 2) $popover-arrow-height;
130+
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
132131
border-left-color: $popover-arrow-color;
133132
}
134133
}

_sass/bootstrap/_tooltip.scss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Base class
2-
@use "sass:math";
32
.tooltip {
43
position: absolute;
54
z-index: $zindex-tooltip;
@@ -38,7 +37,7 @@
3837

3938
&::before {
4039
top: 0;
41-
border-width: $tooltip-arrow-height math.div($tooltip-arrow-width, 2) 0;
40+
border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
4241
border-top-color: $tooltip-arrow-color;
4342
}
4443
}
@@ -54,7 +53,7 @@
5453

5554
&::before {
5655
right: 0;
57-
border-width: math.div($tooltip-arrow-width, 2) $tooltip-arrow-height math.div($tooltip-arrow-width, 2) 0;
56+
border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
5857
border-right-color: $tooltip-arrow-color;
5958
}
6059
}
@@ -68,7 +67,7 @@
6867

6968
&::before {
7069
bottom: 0;
71-
border-width: 0 math.div($tooltip-arrow-width, 2) $tooltip-arrow-height;
70+
border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
7271
border-bottom-color: $tooltip-arrow-color;
7372
}
7473
}
@@ -84,7 +83,7 @@
8483

8584
&::before {
8685
left: 0;
87-
border-width: math.div($tooltip-arrow-width, 2) 0 math.div($tooltip-arrow-width, 2) $tooltip-arrow-height;
86+
border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
8887
border-left-color: $tooltip-arrow-color;
8988
}
9089
}

_sass/bootstrap/_variables.scss

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
// Color system
77

8-
@use "sass:math";
9-
108
$white: #fff !default;
119
$gray-100: #f8f9fa !default;
1210
$gray-200: #e9ecef !default;
@@ -301,7 +299,7 @@ $h4-font-size: $font-size-base * 1.5 !default;
301299
$h5-font-size: $font-size-base * 1.25 !default;
302300
$h6-font-size: $font-size-base !default;
303301

304-
$headings-margin-bottom: math.div($spacer, 2) !default;
302+
$headings-margin-bottom: $spacer / 2 !default;
305303
$headings-font-family: null !default;
306304
$headings-font-weight: 500 !default;
307305
$headings-line-height: 1.2 !default;
@@ -497,7 +495,7 @@ $input-height-border: $input-border-width * 2 !default;
497495

498496
$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;
499497
$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;
500-
$input-height-inner-quarter: add($input-line-height * .25em, math.div($input-padding-y, 2)) !default;
498+
$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default;
501499

502500
$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;
503501
$input-height-sm: add($input-line-height-sm * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;
@@ -567,7 +565,7 @@ $custom-radio-indicator-border-radius: 50% !default;
567565
$custom-radio-indicator-icon-checked: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'><circle r='3' fill='#{$custom-control-indicator-checked-color}'/></svg>") !default;
568566

569567
$custom-switch-width: $custom-control-indicator-size * 1.75 !default;
570-
$custom-switch-indicator-border-radius: math.div($custom-control-indicator-size, 2) !default;
568+
$custom-switch-indicator-border-radius: $custom-control-indicator-size / 2 !default;
571569
$custom-switch-indicator-size: subtract($custom-control-indicator-size, $custom-control-indicator-border-width * 4) !default;
572570

573571
$custom-select-padding-y: $input-padding-y !default;
@@ -712,12 +710,12 @@ $nav-pills-link-active-color: $component-active-color !default;
712710
$nav-pills-link-active-bg: $component-active-bg !default;
713711

714712
$nav-divider-color: $gray-200 !default;
715-
$nav-divider-margin-y: math.div($spacer, 2) !default;
713+
$nav-divider-margin-y: calc($spacer / 2) !default;
716714

717715

718716
// Navbar
719717

720-
$navbar-padding-y: math.div($spacer, 2) !default;
718+
$navbar-padding-y: calc($spacer / 2) !default;
721719
$navbar-padding-x: $spacer !default;
722720

723721
$navbar-nav-link-padding-x: .5rem !default;
@@ -726,7 +724,7 @@ $navbar-brand-font-size: $font-size-lg !default;
726724
// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
727725
$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;
728726
$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;
729-
$navbar-brand-padding-y: math.div($nav-link-height - $navbar-brand-height, 2) !default;
727+
$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default;
730728

731729
$navbar-toggler-padding-y: .25rem !default;
732730
$navbar-toggler-padding-x: .75rem !default;
@@ -842,7 +840,7 @@ $card-bg: $white !default;
842840

843841
$card-img-overlay-padding: 1.25rem !default;
844842

845-
$card-group-margin: math.div($grid-gutter-width, 2) !default;
843+
$card-group-margin: $grid-gutter-width / 2 !default;
846844
$card-deck-margin: $card-group-margin !default;
847845

848846
$card-columns-count: 3 !default;

0 commit comments

Comments
 (0)