Skip to content

Commit d15e990

Browse files
committed
Update specs to convert angle units to deg
See #1607 See sass/sass#2904
1 parent 256f50d commit d15e990

File tree

5 files changed

+10
-95
lines changed

5 files changed

+10
-95
lines changed

spec/core_functions/color/adjust_color/units.hrx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.
3838

3939
To preserve current behavior: calc($hue / 1in)
4040

41-
See https://sass-lang.com/d/color-units
41+
See https://sass-lang.com/d/function-units
4242

4343
,
4444
1 | a {b: adjust-color(red, $hue: 60in)}
@@ -53,26 +53,9 @@ a {b: adjust-color(red, $hue: 60rad)}
5353

5454
<===> hue/angle/output.css
5555
a {
56-
b: yellow;
56+
b: #00b4ff;
5757
}
5858

59-
<===> hue/angle/warning
60-
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.
61-
62-
You're passing 60rad, which is currently (incorrectly) converted to 60deg.
63-
Soon, it will instead be correctly converted to 3437.7467707849deg.
64-
65-
To preserve current behavior: calc($hue * 1deg/1rad)
66-
To migrate to new behavior: 0deg + $hue
67-
68-
See https://sass-lang.com/d/color-units
69-
70-
,
71-
1 | a {b: adjust-color(red, $hue: 60rad)}
72-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73-
'
74-
input.scss 1:7 root stylesheet
75-
7659
<===>
7760
================================================================================
7861
<===> saturation/percent/input.scss

spec/core_functions/color/adjust_hue.hrx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ DEPRECATION WARNING: $degrees: Passing a unit other than deg (60in) is deprecate
118118

119119
To preserve current behavior: calc($degrees / 1in)
120120

121-
See https://sass-lang.com/d/color-units
121+
See https://sass-lang.com/d/function-units
122122

123123
,
124124
1 | a {b: adjust-hue(red, 60in)}
@@ -133,26 +133,9 @@ a {b: adjust-hue(red, 60rad)}
133133

134134
<===> units/angle/output.css
135135
a {
136-
b: yellow;
136+
b: #00b4ff;
137137
}
138138

139-
<===> units/angle/warning
140-
DEPRECATION WARNING: $degrees: Passing a unit other than deg (60rad) is deprecated.
141-
142-
You're passing 60rad, which is currently (incorrectly) converted to 60deg.
143-
Soon, it will instead be correctly converted to 3437.7467707849deg.
144-
145-
To preserve current behavior: calc($degrees * 1deg/1rad)
146-
To migrate to new behavior: 0deg + $degrees
147-
148-
See https://sass-lang.com/d/color-units
149-
150-
,
151-
1 | a {b: adjust-hue(red, 60rad)}
152-
| ^^^^^^^^^^^^^^^^^^^^^^
153-
'
154-
input.scss 1:7 root stylesheet
155-
156139
<===>
157140
================================================================================
158141
<===> named/input.scss

spec/core_functions/color/change_color/units.hrx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.
3838

3939
To preserve current behavior: calc($hue / 1in)
4040

41-
See https://sass-lang.com/d/color-units
41+
See https://sass-lang.com/d/function-units
4242

4343
,
4444
1 | a {b: change-color(red, $hue: 60in)}
@@ -53,26 +53,9 @@ a {b: change-color(red, $hue: 60rad)}
5353

5454
<===> hue/angle/output.css
5555
a {
56-
b: yellow;
56+
b: #00b4ff;
5757
}
5858

59-
<===> hue/angle/warning
60-
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.
61-
62-
You're passing 60rad, which is currently (incorrectly) converted to 60deg.
63-
Soon, it will instead be correctly converted to 3437.7467707849deg.
64-
65-
To preserve current behavior: calc($hue * 1deg/1rad)
66-
To migrate to new behavior: 0deg + $hue
67-
68-
See https://sass-lang.com/d/color-units
69-
70-
,
71-
1 | a {b: change-color(red, $hue: 60rad)}
72-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73-
'
74-
input.scss 1:7 root stylesheet
75-
7659
<===>
7760
================================================================================
7861
<===> saturation/percent/input.scss

spec/core_functions/color/hsl/three_args/units.hrx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (60in) is deprecated.
5353

5454
To preserve current behavior: calc($hue / 1in)
5555

56-
See https://sass-lang.com/d/color-units
56+
See https://sass-lang.com/d/function-units
5757

5858
,
5959
1 | a {b: hsl(60in, 100%, 50%)}
@@ -70,31 +70,14 @@ a {b: hsl(60rad, 100%, 50%)}
7070

7171
<===> hue/angle/output.css
7272
a {
73-
b: hsl(60deg, 100%, 50%);
73+
b: hsl(197.7467707849deg, 100%, 50%);
7474
}
7575

7676
<===> hue/angle/output-libsass.css
7777
a {
7878
b: yellow;
7979
}
8080

81-
<===> hue/angle/warning
82-
DEPRECATION WARNING: $hue: Passing a unit other than deg (60rad) is deprecated.
83-
84-
You're passing 60rad, which is currently (incorrectly) converted to 60deg.
85-
Soon, it will instead be correctly converted to 3437.7467707849deg.
86-
87-
To preserve current behavior: calc($hue * 1deg/1rad)
88-
To migrate to new behavior: 0deg + $hue
89-
90-
See https://sass-lang.com/d/color-units
91-
92-
,
93-
1 | a {b: hsl(60rad, 100%, 50%)}
94-
| ^^^^^^^^^^^^^^^^^^^^^
95-
'
96-
input.scss 1:7 root stylesheet
97-
9881
<===> hue/angle/warning-libsass
9982

10083
<===>

spec/core_functions/color/hwb/three_args/units.hrx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,9 @@ a {b: color.hwb(1rad, 30%, 40%)}
1515

1616
<===> hue/rad/output.css
1717
a {
18-
b: #994e4d;
18+
b: #99964d;
1919
}
2020

21-
<===> hue/rad/warning
22-
DEPRECATION WARNING: $hue: Passing a unit other than deg (1rad) is deprecated.
23-
24-
You're passing 1rad, which is currently (incorrectly) converted to 1deg.
25-
Soon, it will instead be correctly converted to 57.2957795131deg.
26-
27-
To preserve current behavior: calc($hue * 1deg/1rad)
28-
To migrate to new behavior: 0deg + $hue
29-
30-
See https://sass-lang.com/d/color-units
31-
32-
,
33-
2 | a {b: color.hwb(1rad, 30%, 40%)}
34-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
35-
'
36-
input.scss 2:7 root stylesheet
37-
3821
<===>
3922
================================================================================
4023
<===> hue/non_angle/input.scss
@@ -51,7 +34,7 @@ DEPRECATION WARNING: $hue: Passing a unit other than deg (1in) is deprecated.
5134

5235
To preserve current behavior: calc($hue / 1in)
5336

54-
See https://sass-lang.com/d/color-units
37+
See https://sass-lang.com/d/function-units
5538

5639
,
5740
2 | a {b: color.hwb(1in, 30%, 40%)}

0 commit comments

Comments
 (0)