1
+ <===> options.yml
2
+ ---
3
+ :ignore_for:
4
+ - libsass
5
+
6
+ <===>
7
+ ================================================================================
1
8
<===> integer/input.scss
2
- a {b: round(1)}
9
+ @use "sass:math";
10
+ a {b: math.round(1)}
3
11
4
12
<===> integer/output.css
5
13
a {
9
17
<===>
10
18
================================================================================
11
19
<===> up/high/input.scss
12
- a {b: round(2.9)}
20
+ @use "sass:math";
21
+ a {b: math.round(2.9)}
13
22
14
23
<===> up/high/output.css
15
24
a {
19
28
<===>
20
29
================================================================================
21
30
<===> up/point_five/input.scss
22
- a {b: round(16.5)}
31
+ @use "sass:math";
32
+ a {b: math.round(16.5)}
23
33
24
34
<===> up/point_five/output.css
25
35
a {
29
39
<===>
30
40
================================================================================
31
41
<===> up/negative/input.scss
32
- a {b: round(-5.4)}
42
+ @use "sass:math";
43
+ a {b: math.round(-5.4)}
33
44
34
45
<===> up/negative/output.css
35
46
a {
39
50
<===>
40
51
================================================================================
41
52
<===> up/to_zero/input.scss
42
- a {b: round(-0.2)}
53
+ @use "sass:math";
54
+ a {b: math.round(-0.2)}
43
55
44
56
<===> up/to_zero/output.css
45
57
a {
49
61
<===>
50
62
================================================================================
51
63
<===> down/low/input.scss
52
- a {b: round(2.2)}
64
+ @use "sass:math";
65
+ a {b: math.round(2.2)}
53
66
54
67
<===> down/low/output.css
55
68
a {
59
72
<===>
60
73
================================================================================
61
74
<===> down/negative/input.scss
62
- a {b: round(-5.6)}
75
+ @use "sass:math";
76
+ a {b: math.round(-5.6)}
63
77
64
78
<===> down/negative/output.css
65
79
a {
69
83
<===>
70
84
================================================================================
71
85
<===> down/to_zero/input.scss
72
- a {b: round(0.2)}
86
+ @use "sass:math";
87
+ a {b: math.round(0.2)}
73
88
74
89
<===> down/to_zero/output.css
75
90
a {
85
100
<===> down/within_precision/input.scss
86
101
// This is the largest number that's representable as a float and outside the
87
102
// precision range to be considered equal to 1.5.
88
- a {b: round(1.4999999999949998)}
103
+ @use "sass:math";
104
+ a {b: math.round(1.4999999999949998)}
89
105
90
106
<===> down/within_precision/output.css
91
107
a {
99
115
- sass/libsass#2887
100
116
101
117
<===> preserves_units/input.scss
102
- a {b: round(7px / 4em) * 1em}
118
+ @use "sass:math";
119
+ a {b: math.round(7px / 4em) * 1em}
103
120
104
121
<===> preserves_units/output.css
105
122
a {
@@ -114,15 +131,16 @@ Recommendation: math.div(7px, 4em)
114
131
More info and automated migrator: https://sass-lang.com/d/slash-div
115
132
116
133
,
117
- 1 | a {b: round(7px / 4em) * 1em}
118
- | ^^^^^^^^^
134
+ 2 | a {b: math. round(7px / 4em) * 1em}
135
+ | ^^^^^^^^^
119
136
'
120
- input.scss 1:13 root stylesheet
137
+ input.scss 2:18 root stylesheet
121
138
122
139
<===>
123
140
================================================================================
124
141
<===> named/input.scss
125
- a {b: round($number: 1.6)}
142
+ @use "sass:math";
143
+ a {b: math.round($number: 1.6)}
126
144
127
145
<===> named/output.css
128
146
a {
@@ -132,15 +150,16 @@ a {
132
150
<===>
133
151
================================================================================
134
152
<===> error/type/input.scss
135
- a {b: round(c)}
153
+ @use "sass:math";
154
+ a {b: math.round(c)}
136
155
137
156
<===> error/type/error
138
157
Error: $number: c is not a number.
139
158
,
140
- 1 | a {b: round(c)}
141
- | ^^^^^^^^
159
+ 2 | a {b: math. round(c)}
160
+ | ^^^^^^^^^^^^^
142
161
'
143
- input.scss 1 :7 root stylesheet
162
+ input.scss 2 :7 root stylesheet
144
163
145
164
<===> error/type/error-libsass
146
165
Error: argument `$number` of `round($number)` must be a number
@@ -153,19 +172,20 @@ Error: argument `$number` of `round($number)` must be a number
153
172
<===>
154
173
================================================================================
155
174
<===> error/too_few_args/input.scss
156
- a {b: round()}
175
+ @use "sass:math";
176
+ a {b: math.round()}
157
177
158
178
<===> error/too_few_args/error
159
179
Error: Missing argument $number.
160
180
,--> input.scss
161
- 1 | a {b: round()}
162
- | ^^^^^^^ invocation
181
+ 2 | a {b: math. round()}
182
+ | ^^^^^^^^^^^^ invocation
163
183
'
164
184
,--> sass:math
165
185
1 | @function round($number) {
166
186
| ============== declaration
167
187
'
168
- input.scss 1 :7 root stylesheet
188
+ input.scss 2 :7 root stylesheet
169
189
170
190
<===> error/too_few_args/error-libsass
171
191
Error: Function round is missing argument $number.
@@ -177,20 +197,21 @@ Error: Function round is missing argument $number.
177
197
<===>
178
198
================================================================================
179
199
<===> error/too_many_args/input.scss
180
- a {b: round(1, 2)}
200
+ @use "sass:math";
201
+ a {b: math.round(1, 2)}
181
202
182
203
183
204
<===> error/too_many_args/error
184
205
Error: Only 1 argument allowed, but 2 were passed.
185
206
,--> input.scss
186
- 1 | a {b: round(1, 2)}
187
- | ^^^^^^^^^^^ invocation
207
+ 2 | a {b: math. round(1, 2)}
208
+ | ^^^^^^^^^^^^^^^^ invocation
188
209
'
189
210
,--> sass:math
190
211
1 | @function round($number) {
191
212
| ============== declaration
192
213
'
193
- input.scss 1 :7 root stylesheet
214
+ input.scss 2 :7 root stylesheet
194
215
195
216
<===> error/too_many_args/error-libsass
196
217
Error: wrong number of arguments (2 for 1) for `round'
0 commit comments