Skip to content

Commit

Permalink
Add specs for alpha units in rgba() and hsla() (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 16, 2018
1 parent 7d04d54 commit e922f22
Show file tree
Hide file tree
Showing 46 changed files with 94 additions and 611 deletions.
File renamed without changes.
@@ -0,0 +1,7 @@
.alpha-percent {
negative: rgba(0, 0, 0, 0);
min: rgba(0, 0, 0, 0);
positive: rgba(0, 0, 0, 0.456);
max: black;
above-max: black;
}
7 changes: 7 additions & 0 deletions spec/core_functions/color/hsla/alpha_percent/input.scss
@@ -0,0 +1,7 @@
.alpha-percent {
negative: hsla(0, 0, 0, -10%);
min: hsla(0, 0, 0, 0%);
positive: hsla(0, 0, 0, 45.6%);
max: hsla(0, 0, 0, 100%);
above-max: hsla(0, 0, 0, 250%);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/hsla/alpha_percent/options.yml
@@ -0,0 +1,4 @@
---
:start_version: '3.7'
:todo:
- libsass # sass/libsass#2719
@@ -0,0 +1,7 @@
.alpha-unitless {
negative: rgba(0, 0, 0, 0);
min: rgba(0, 0, 0, 0);
positive: rgba(0, 0, 0, 0.456);
max: black;
above-max: black;
}
7 changes: 7 additions & 0 deletions spec/core_functions/color/hsla/alpha_unitless/input.scss
@@ -0,0 +1,7 @@
.alpha-unitless {
negative: hsla(0, 0, 0, -10);
min: hsla(0, 0, 0, 0);
positive: hsla(0, 0, 0, 0.456);
max: hsla(0, 0, 0, 1);
above-max: hsla(0, 0, 0, 250);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/hsla/error/alpha_unit/error
@@ -0,0 +1,4 @@
Error: $alpha: Expected 0.5px to have no units or "%".
a: hsla(0, 0, 0, 0.5px);
^^^^^^^^^^^^^^^^^^^^
/sass/spec/core_functions/color/hsla/error/alpha_unit/input.scss 2:6 root stylesheet
@@ -0,0 +1,3 @@
Error: $alpha: Expected 0.5px to have no units or "%" for `hsla'
on line 2 of /sass/spec/core_functions/color/hsla/error/alpha_unit/input.scss
Use --trace for backtrace.
3 changes: 3 additions & 0 deletions spec/core_functions/color/hsla/error/alpha_unit/input.scss
@@ -0,0 +1,3 @@
.alpha-unit {
a: hsla(0, 0, 0, 0.5px);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/hsla/error/alpha_unit/options.yml
@@ -0,0 +1,4 @@
---
:start_version: '3.7'
:todo:
- libsass # sass/libsass#2719
1 change: 1 addition & 0 deletions spec/core_functions/color/hsla/error/alpha_unit/status
@@ -0,0 +1 @@
65
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,7 @@
.alpha-percent {
negative: rgba(0, 0, 0, 0);
min: rgba(0, 0, 0, 0);
positive: rgba(0, 0, 0, 0.456);
max: black;
above-max: black;
}
7 changes: 7 additions & 0 deletions spec/core_functions/color/rgba/alpha_percent/input.scss
@@ -0,0 +1,7 @@
.alpha-percent {
negative: rgba(0, 0, 0, -10%);
min: rgba(0, 0, 0, 0%);
positive: rgba(0, 0, 0, 45.6%);
max: rgba(0, 0, 0, 100%);
above-max: rgba(0, 0, 0, 250%);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/rgba/alpha_percent/options.yml
@@ -0,0 +1,4 @@
---
:start_version: '3.7'
:todo:
- libsass # sass/libsass#2719
@@ -0,0 +1,7 @@
.alpha-unitless {
negative: rgba(0, 0, 0, 0);
min: rgba(0, 0, 0, 0);
positive: rgba(0, 0, 0, 0.456);
max: black;
above-max: black;
}
7 changes: 7 additions & 0 deletions spec/core_functions/color/rgba/alpha_unitless/input.scss
@@ -0,0 +1,7 @@
.alpha-unitless {
negative: rgba(0, 0, 0, -10);
min: rgba(0, 0, 0, 0);
positive: rgba(0, 0, 0, 0.456);
max: rgba(0, 0, 0, 1);
above-max: rgba(0, 0, 0, 250);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/rgba/error/alpha_unit/error
@@ -0,0 +1,4 @@
Error: $alpha: Expected 0.5px to have no units or "%".
a: rgba(0, 0, 0, 0.5px);
^^^^^^^^^^^^^^^^^^^^
/sass/spec/core_functions/color/rgba/error/alpha_unit/input.scss 2:6 root stylesheet
@@ -0,0 +1,3 @@
Error: $alpha: Expected 0.5px to have no units or "%" for `rgba'
on line 2 of /sass/spec/core_functions/color/rgba/error/alpha_unit/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/core_functions/color/rgba/error/alpha_unit/input.scss
@@ -0,0 +1,3 @@
.alpha-unit {
a: rgba(0, 0, 0, 0.5px);
}
4 changes: 4 additions & 0 deletions spec/core_functions/color/rgba/error/alpha_unit/options.yml
@@ -0,0 +1,4 @@
---
:start_version: '3.7'
:todo:
- libsass # sass/libsass#2719
1 change: 1 addition & 0 deletions spec/core_functions/color/rgba/error/alpha_unit/status
@@ -0,0 +1 @@
65
File renamed without changes.

0 comments on commit e922f22

Please sign in to comment.