From afbcc17d1279180db28a58044dca39b6e909c6b9 Mon Sep 17 00:00:00 2001 From: akianonymus Date: Sat, 25 Feb 2023 19:50:18 +0530 Subject: feat: Improve hsl parser follow https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl add support for deg, turn and all alpha values merge hsl and hsla into one parser less regex computation --- test/expectation.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'test/expectation.txt') diff --git a/test/expectation.txt b/test/expectation.txt index d04bf92..37472e0 100644 --- a/test/expectation.txt +++ b/test/expectation.txt @@ -20,8 +20,11 @@ White rgb(0,0,0) rgb(10, 100 , 100) rgba(200,30,0,1) rgba(200,30,0,0.5) -hsl(300,50%,50%) hsla(300,50%,50%,0.5) -hsla(300,50%,50%,1.0000000000000001) +hsl(300 50% 50%) hsl(300 50% 50% / 1) hsl(100 80% 50% / 0.4) +hsl(990 80% 50% / 0.4) hsl(720 80% 50% / 0.4) +hsl(1turn 80% 50% / 0.4) hsl(0.4turn 80% 50% / 0.4) hsl(1.4turn 80% 50% / 0.4) +hsla(300 50% 50%) hsla(300 50% 50% / 1) +hsla(300 50% 50% / 0.4) hsla(300,50%,50%,05) hsla(360,50%,50%,1.0000000000000001) ]] @@ -37,9 +40,10 @@ Blueberry Gray1000 BlueGree BlueGray matcher#add rgb(10,256,100) rgb (10,255,100) -rgb(10, 1 00 , 100) -hsla(300,50%,50%,05) -hsla(300,50%,50%,1.000000000000001) +rgb(10, 1 00 , 100) +hsl(300 50% 50% 1) +hsl(300 50% 50 / 1) +hsla(10 10% 10% 1) hsla(300,50%,50,1.0000000000000001) hsla(300,50,50,1.0000000000000001) hsla(361,50,50,1.0000000000000001) -- cgit v1.2.3-70-g09d2