Skip to content

Commit

Permalink
Breakup core_functions/global/color
Browse files Browse the repository at this point in the history
  • Loading branch information
jathak committed Jul 17, 2024
1 parent e70744b commit 765e3fd
Show file tree
Hide file tree
Showing 25 changed files with 697 additions and 766 deletions.
766 changes: 0 additions & 766 deletions spec/core_functions/global/color.hrx

This file was deleted.

19 changes: 19 additions & 0 deletions spec/core_functions/global/color/alpha.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: alpha(#abcdef)}

<===> output.css
a {
b: 1;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.alpha instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: alpha(#abcdef)}
| ^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/blue.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: blue(#abcdef)}

<===> output.css
a {
b: 239;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.blue instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: blue(#abcdef)}
| ^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/change.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: change-color(#abcdef, $red: 10)}

<===> output.css
a {
b: #0acdef;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.change instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: change-color(#abcdef, $red: 10)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/complement.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: complement(#abcdef)}

<===> output.css
a {
b: #efcdab;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.complement instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: complement(#abcdef)}
| ^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/darken.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: darken(#abcdef, 10%)}

<===> output.css
a {
b: #80b4e7;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: darken(#abcdef, 10%)}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/desaturate.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: desaturate(#abcdef, 10%)}

<===> output.css
a {
b: #b0cdea;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: desaturate(#abcdef, 10%)}
| ^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
141 changes: 141 additions & 0 deletions spec/core_functions/global/color/error.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<===> too_low/lighten/input.scss
a {b: lighten(red, -0.001)}

<===> too_low/lighten/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: lighten(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 100.
,
1 | a {b: lighten(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> too_low/darken/input.scss
a {b: darken(red, -0.001)}

<===> too_low/darken/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: darken(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 100.
,
1 | a {b: darken(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> too_low/saturate/input.scss
a {b: saturate(red, -0.001)}

<===> too_low/saturate/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: saturate(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 100.
,
1 | a {b: saturate(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> too_low/desaturate/input.scss
a {b: desaturate(red, -0.001)}

<===> too_low/desaturate/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: desaturate(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 100.
,
1 | a {b: desaturate(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> too_low/fade_in/input.scss
a {b: fade-in(red, -0.001)}

<===> too_low/fade_in/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: fade-in(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 1.
,
1 | a {b: fade-in(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> too_low/fade_out/input.scss
a {b: fade-out(red, -0.001)}

<===> too_low/fade_out/error
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: fade-out(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

Error: $amount: Expected -0.001 to be within 0 and 1.
,
1 | a {b: fade-out(red, -0.001)}
| ^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/fade-in.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: fade-in(rgba(red, 0.5), 0.3)}

<===> output.css
a {
b: rgba(255, 0, 0, 0.8);
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: fade-in(rgba(red, 0.5), 0.3)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/fade-out.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: fade-out(rgba(red, 0.5), 0.3)}

<===> output.css
a {
b: rgba(255, 0, 0, 0.2);
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.adjust instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: fade-out(rgba(red, 0.5), 0.3)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
61 changes: 61 additions & 0 deletions spec/core_functions/global/color/grayscale.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<===> with_color/input.scss
a {b: grayscale(red)}

<===> with_color/output.css
a {
b: gray;
}

<===> with_color/warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.grayscale instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: grayscale(red)}
| ^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet

<===>
================================================================================
<===> with_number/input.scss
// A number should produce a plain function string, for CSS filter functions.
a {b: grayscale(15%)}

<===> with_number/output.css
a {
b: grayscale(15%);
}

<===>
================================================================================
<===> with_css_var/input.scss
a {b: grayscale(var(--c))}

<===> with_css_var/output.css
a {
b: grayscale(var(--c));
}

<===>
================================================================================
<===> with_calc/input.scss
a {b: grayscale(calc(1 + 2))}

<===> with_calc/output.css
a {
b: grayscale(3);
}

<===>
================================================================================
<===> with_unquoted_calc/input.scss
@use "sass:string";
a {b: grayscale(string.unquote('calc(1)'))}

<===> with_unquoted_calc/output.css
a {
b: grayscale(calc(1));
}
19 changes: 19 additions & 0 deletions spec/core_functions/global/color/green.hrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<===> input.scss
a {b: green(#abcdef)}

<===> output.css
a {
b: 205;
}

<===> warning
DEPRECATION WARNING: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.
Use color.green instead.

More info and automated migrator: https://sass-lang.com/d/import

,
1 | a {b: green(#abcdef)}
| ^^^^^^^^^^^^^^
'
input.scss 1:7 root stylesheet
Loading

0 comments on commit 765e3fd

Please sign in to comment.