Skip to content

Parse legacy hsl() with whitespace before its commas - #232

Open
lehni wants to merge 1 commit into
linebender:mainfrom
lehni:fix/css-color-hsl-whitespace
Open

lehni wants to merge 1 commit into
linebender:mainfrom
lehni:fix/css-color-hsl-whitespace

Conversation

@lehni

@lehni lehni commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Legacy hsl()/hsla() didn't accept whitespace between the hue and its comma, e.g. hsl( 120 , 100% , 50% ), which rgb() already accepts: hsl() now skips whitespace before checking for the comma, as rgb() does. Found with the web-platform-tests' canvas colour tests (2d.fillStyle.parse.hsl-2, hsla-2). With a test.

@lehni
lehni force-pushed the fix/css-color-hsl-whitespace branch from 4e337ac to 573d004 Compare October 21, 2026 11:16
@lehni
lehni force-pushed the fix/css-color-hsl-whitespace branch from 573d004 to 2e7d53c Compare October 21, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant