Skip to content

Commit

Permalink
tests: append rgb/rgba cases with decimal alpha layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerdic committed Sep 21, 2023
1 parent 187b973 commit c79fb32
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testing/unit-tests/csst/values/rgb.csst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ Test rgb variants
--CSS--
white { color: rgb(255, 255, 255); }
white10 { color: rgb(255, 255, 255, 10%); }
white10d { color: rgb(255, 255, 255, 0.1); }
white20 { color: rgb(255, 255, 255, 20%); }
white20d { color: rgb(255, 255, 255, 0.2); }
white30 { color: rgb(255 255 255 / 30%); }
white30d { color: rgb(255 255 255 / 0.3); }
--EXPECT--
array(
'white' => array(
Expand All @@ -13,12 +16,21 @@ array(
'white10' => array(
'color' => '#ffffff1a'
),
'white10d' => array(
'color' => '#ffffff1a'
),
'white20' => array(
'color' => '#fff3'
),
'white20d' => array(
'color' => '#fff3'
),
'white30' => array(
'color' => '#ffffff4d'
),
'white30d' => array(
'color' => '#ffffff4d'
),
)
--SETTINGS--
compress_colors=1
12 changes: 12 additions & 0 deletions testing/unit-tests/csst/values/rgba.csst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ Test rgb variants
--CSS--
white { color: rgba(255, 255, 255); }
white10 { color: rgba(255, 255, 255, 10%); }
white10d { color: rgba(255, 255, 255, 0.1); }
white20 { color: rgba(255, 255, 255, 20%); }
white20d { color: rgba(255, 255, 255, 0.2); }
white30 { color: rgba(255 255 255 / 30%); }
white30d { color: rgba(255 255 255 / 0.3); }
--EXPECT--
array(
'white' => array(
Expand All @@ -13,12 +16,21 @@ array(
'white10' => array(
'color' => '#ffffff1a'
),
'white10d' => array(
'color' => '#ffffff1a'
),
'white20' => array(
'color' => '#fff3'
),
'white20d' => array(
'color' => '#fff3'
),
'white30' => array(
'color' => '#ffffff4d'
),
'white30d' => array(
'color' => '#ffffff4d'
),
)
--SETTINGS--
compress_colors=1

0 comments on commit c79fb32

Please sign in to comment.