Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit 589edd2

Browse files
committed
Revert "Ran the SASS migration tool on division so deprecation warnings stop being thrown. (#1107) (#1110)"
This reverts commit b3e2cc5.
1 parent 5202e43 commit 589edd2

File tree

6 files changed

+17
-27
lines changed

6 files changed

+17
-27
lines changed

Diff for: core/bourbon/library/_modular-scale.scss

+5-7
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
///
6868
/// @require {function} _fetch-bourbon-setting
6969

70-
@use "sass:math";
71-
7270
@function modular-scale(
7371
$increment,
7472
$value: _fetch-bourbon-setting("modular-scale-base"),
@@ -80,7 +78,7 @@
8078

8179
// scale $v2 to just above $v1
8280
@while $v2 > $v1 {
83-
$v2: math.div($v2, $ratio); // will be off-by-1
81+
$v2: ($v2 / $ratio); // will be off-by-1
8482
}
8583
@while $v2 < $v1 {
8684
$v2: ($v2 * $ratio); // will fix off-by-1
@@ -104,15 +102,15 @@
104102
@if $increment < 0 {
105103
// adjust $v2 to just below $v1
106104
@if $double-stranded {
107-
$v2: math.div($v2, $ratio);
105+
$v2: ($v2 / $ratio);
108106
}
109107

110108
@for $i from $increment through -1 {
111-
@if $double-stranded and math.div($v1, $ratio) < $v2 {
109+
@if $double-stranded and ($v1 / $ratio) < $v2 {
112110
$value: $v2;
113-
$v2: math.div($v2, $ratio);
111+
$v2: ($v2 / $ratio);
114112
} @else {
115-
$v1: math.div($v1, $ratio);
113+
$v1: ($v1 / $ratio);
116114
$value: $v1;
117115
}
118116
}

Diff for: core/bourbon/library/_strip-unit.scss

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
/// // Output
1313
/// $dimension: 10;
1414

15-
@use "sass:math";
16-
1715
@function strip-unit($value) {
18-
@return math.div($value, $value * 0 + 1);
16+
@return ($value / ($value * 0 + 1));
1917
}

Diff for: core/bourbon/library/_triangle.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@
5555

5656
@if $direction == "up" {
5757
border-color: transparent transparent $color;
58-
border-width: 0 ($width * 0.5) $height;
58+
border-width: 0 ($width / 2) $height;
5959
} @else if $direction == "up-right" {
6060
border-color: transparent $color transparent transparent;
6161
border-width: 0 $width $width 0;
6262
} @else if $direction == "right" {
6363
border-color: transparent transparent transparent $color;
64-
border-width: ($height * 0.5) 0 ($height * 0.5) $width;
64+
border-width: ($height / 2) 0 ($height / 2) $width;
6565
} @else if $direction == "down-right" {
6666
border-color: transparent transparent $color;
6767
border-width: 0 0 $width $width;
6868
} @else if $direction == "down" {
6969
border-color: $color transparent transparent;
70-
border-width: $height ($width * 0.5) 0;
70+
border-width: $height ($width / 2) 0;
7171
} @else if $direction == "down-left" {
7272
border-color: transparent transparent transparent $color;
7373
border-width: $width 0 0 $width;
7474
} @else if $direction == "left" {
7575
border-color: transparent $color transparent transparent;
76-
border-width: ($height * 0.5) $width ($height * 0.5) 0;
76+
border-width: ($height / 2) $width ($height / 2) 0;
7777
} @else if $direction == "up-left" {
7878
border-color: $color transparent transparent;
7979
border-width: $width $width 0 0;

Diff for: core/bourbon/utilities/_contrast-ratio.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919
///
2020
/// @access private
2121

22-
@use "sass:math";
23-
2422
@function _contrast-ratio($color-1, $color-2) {
2523
$-local-lightness-1: _lightness($color-1) + 0.05;
2624
$-local-lightness-2: _lightness($color-2) + 0.05;
2725

2826
@if $-local-lightness-1 > $-local-lightness-2 {
29-
@return math.div($-local-lightness-1, $-local-lightness-2);
27+
@return $-local-lightness-1 / $-local-lightness-2;
3028
} @else {
31-
@return math.div($-local-lightness-2, $-local-lightness-1);
29+
@return $-local-lightness-2 / $-local-lightness-1;
3230
}
3331
}

Diff for: core/bourbon/utilities/_gamma.scss

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
///
1111
/// @access private
1212

13-
@use "sass:math";
14-
1513
@function _gamma($channel) {
1614
@if $channel < 0.03928 {
17-
@return math.div($channel, 12.92);
15+
@return $channel / 12.92;
1816
} @else {
19-
$c: math.div($channel + 0.055, 1.055);
17+
$c: ($channel + 0.055) / 1.055;
2018
@if function-exists("pow") {
2119
@return pow($c, 2.4);
2220
} @else {

Diff for: core/bourbon/utilities/_lightness.scss

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@
1111
///
1212
/// @access private
1313

14-
@use "sass:math";
15-
1614
@function _lightness($hex-color) {
1715
$-local-red-raw: red(rgba($hex-color, 1));
1816
$-local-green-raw: green(rgba($hex-color, 1));
1917
$-local-blue-raw: blue(rgba($hex-color, 1));
2018

21-
$-local-red: _gamma(math.div($-local-red-raw, 255));
22-
$-local-green: _gamma(math.div($-local-green-raw, 255));
23-
$-local-blue: _gamma(math.div($-local-blue-raw, 255));
19+
$-local-red: _gamma($-local-red-raw / 255);
20+
$-local-green: _gamma($-local-green-raw / 255);
21+
$-local-blue: _gamma($-local-blue-raw / 255);
2422

2523
@return $-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722;
2624
}

0 commit comments

Comments
 (0)