Skip to content

Commit

Permalink
Final review Corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelalozano16 committed Jul 7, 2023
1 parent 33bf4be commit c751373
Show file tree
Hide file tree
Showing 13 changed files with 566 additions and 238 deletions.
20 changes: 7 additions & 13 deletions spec/values/calculation/abs.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ a {
<===> operation/integer/warning
DEPRECATION WARNING: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.

To preserve current behavior:
math.abs(85%)
To emit a CSS abs() now:
abs(#{85%})
More info: https://sass-lang.com/documentation/values/calculations#abs
To preserve current behavior: math.abs(85%)
To emit a CSS abs() now: abs(#{85%})
More info: https://sass-lang.com/d/abs-percent
,
1 | a {b: abs(17 * 5%)}
| ^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -197,12 +194,9 @@ a {
<===> abs_percentage_warning/warning
DEPRECATION WARNING: Passing percentage units to the global abs() function is deprecated.
In the future, this will emit a CSS abs() function to be resolved by the browser.

To preserve current behavior:
math.abs(-7.5%)
To emit a CSS abs() now:
abs(#{-7.5%})
More info: https://sass-lang.com/documentation/values/calculations#abs
To preserve current behavior: math.abs(-7.5%)
To emit a CSS abs() now: abs(#{-7.5%})
More info: https://sass-lang.com/d/abs-percent
,
1 | a {b: abs(-7.5%)}
| ^^^^^^^^^^^^^^^^^
Expand All @@ -212,7 +206,7 @@ More info: https://sass-lang.com/documentation/values/calculations#abs
<===>
================================================================================
<===> math/slash_as_division/input.scss
b {
b {
a: 2px / abs(1.5);
}

Expand Down
29 changes: 16 additions & 13 deletions spec/values/calculation/acos.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ a {
b: calc(NaN * 1deg);
}

<===>
================================================================================
<===> percent/input.scss
a {b: acos(1%)}

<===> percent/output.css
a {
b: acos(1%);
}

<===>
================================================================================
<===> preserved/percent/input.scss
Expand Down Expand Up @@ -124,17 +114,30 @@ a {

<===>
================================================================================
<===> units/input.scss
<===> error/units/input.scss
a {b: acos(1px)}

<===> units/error
Error: $number: Expected 1px to have no units.
<===> error/units/error
Error: Expected 1px to have no units.
,
1 | a {b: acos(1px)}
| ^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/percent/input.scss
a {b: acos(1%)}

<===> error/percent/error
Error: Expected 1% to have no units.
,
1 | a {b: acos(1%)}
| ^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/type/input.scss
Expand Down
49 changes: 26 additions & 23 deletions spec/values/calculation/asin.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -102,29 +102,6 @@ a {
b: calc(NaN * 1deg);
}

<===>
================================================================================
<===> units/input.scss
a {b: asin(1px)}

<===> units/error
Error: $number: Expected 1px to have no units.
,
1 | a {b: asin(1px)}
| ^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> percent/input.scss
a {b: asin(1%)}

<===> percent/output.css
a {
b: asin(1%);
}

<===>
================================================================================
<===> preserved/percent/input.scss
Expand Down Expand Up @@ -175,6 +152,32 @@ a {
b: asin(test);
}

<===>
================================================================================
<===> error/units/input.scss
a {b: asin(1px)}

<===> error/units/error
Error: Expected 1px to have no units.
,
1 | a {b: asin(1px)}
| ^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/percent/input.scss
a {b: asin(1%)}

<===> error/percent/error
Error: Expected 1% to have no units.
,
1 | a {b: asin(1%)}
| ^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/type/input.scss
Expand Down
39 changes: 21 additions & 18 deletions spec/values/calculation/atan.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,6 @@ a {
b: 90deg;
}

<===>
================================================================================
<===> units/input.scss
a {b: atan(1px)}

<===> units/error
Error: $number: Expected 1px to have no units.
,
1 | a {b: atan(1px)}
| ^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> preserved/percent/input.scss
Expand Down Expand Up @@ -188,10 +175,26 @@ Error: expected "+", "-", "*", "/", or ")".

<===>
================================================================================
<===> percent/input.scss
<===> error/units/input.scss
a {b: atan(1px)}

<===> error/units/error
Error: Expected 1px to have no units.
,
1 | a {b: atan(1px)}
| ^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/percent/input.scss
a {b: atan(1%)}

<===> percent/output.css
a {
b: atan(1%);
}
<===> error/percent/error
Error: Expected 1% to have no units.
,
1 | a {b: atan(1%)}
| ^^^^^^^^
'
input.scss 1:7 root stylesheet
12 changes: 12 additions & 0 deletions spec/values/calculation/atan2.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ a {
b: atan2(test);
}

<===>
================================================================================
<===> preserved/unknown_units/input.scss
a {
b: atan2(1foo, 2bar);
}

<===> preserved/unknown_units/output.css
a {
b: atan2(1foo, 2bar);
}

<===>
================================================================================
<===> error/y_type/input.scss
Expand Down
27 changes: 22 additions & 5 deletions spec/values/calculation/exp.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,32 @@ Error: Number 1px*px isn't compatible with CSS calculations.
'
input.scss 1:11 root stylesheet

<===>
================================================================================
<===> error/percentage/input.scss
a {b: exp(5%)}

<===> error/percentage/error
Error: Expected 5% to have no units.
,
1 | a {b: exp(5%)}
| ^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> error/unit/input.scss
a {b: calc(exp(5%))}
a {b: exp(5px)}

<===> error/unit/error
Error: Expected 5px to have no units.
,
1 | a {b: exp(5px)}
| ^^^^^^^^
'
input.scss 1:7 root stylesheet

<===> error/unit/output.css
a {
b: exp(5%);
}

<===>
================================================================================
Expand Down
27 changes: 25 additions & 2 deletions spec/values/calculation/hypot.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ a {
b: 11.6189500386;
}

<===>
================================================================================
<===> variable/input.scss
$number: 3;
a {b: hypot(3 + 10, 4, 5, 6, 7)}

<===> variable/output.css
a {
b: 17.1755640373;
}

<===>
================================================================================
<===> compatible_units/input.scss
Expand Down Expand Up @@ -83,7 +94,7 @@ a {
<===> preserved/variable/two_args/input.scss
b {
--x: 4px
--y: 6px;
--y: 6px;
a: hypot(var(--x), var(--y));
}

Expand All @@ -98,7 +109,7 @@ b {
================================================================================
<===> preserved/variable/one_arg/input.scss
b {
--example: 4px, 6px;
--example: 4px, 6px;
a: hypot(var(--example));
}

Expand Down Expand Up @@ -144,6 +155,18 @@ a {
b: hypot(test);
}

<===>
================================================================================
<===> preserved/unknown_units/input.scss
a {
b: hypot(1foo, 2bar);
}

<===> preserved/unknown_units/output.css
a {
b: hypot(1foo, 2bar);
}

<===>
================================================================================
<===> error/type/first/input.scss
Expand Down
Loading

0 comments on commit c751373

Please sign in to comment.