Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure HSL is spec compliant #428

Open
lloydk opened this issue Feb 12, 2024 · 3 comments
Open

Ensure HSL is spec compliant #428

lloydk opened this issue Feb 12, 2024 · 3 comments
Labels
bug Something isn't working spec-parity Parity with the CSS Color specs

Comments

@lloydk
Copy link
Collaborator

lloydk commented Feb 12, 2024

Additional formats need to be added to the hsl color space in order to be spec compliant.

For example: hsla(240deg 100% 50%) fails to parse.

@lloydk lloydk added bug Something isn't working spec-parity Parity with the CSS Color specs labels Feb 12, 2024
@LeaVerou
Copy link
Member

Good catch!

It would be nice if we could add tests for these and somehow mark them as known failures. I could add a feature to htest for this. Do other test frameworks handle this somehow?

@lloydk
Copy link
Collaborator Author

lloydk commented Feb 13, 2024

Good catch!

It would be nice if we could add tests for these and somehow mark them as known failures. I could add a feature to htest for this. Do other test frameworks handle this somehow?

Jest uses skip.

Minitest and Rspec from the Ruby world also use skip.

I think adding a skip property to htest would work:

{
	name: "hwb()",
	skip: true,
	tests: [
		{
			args: "hwb(180 20% 30%)",
			expect: '{"spaceId":"hwb","coords":[180,20,30],"alpha":1}'
		},
	]
}

The test runners could output the number of skipped tests

@LeaVerou
Copy link
Member

That should be very easy! Can you open an issue on htest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spec-parity Parity with the CSS Color specs
Projects
None yet
Development

No branches or pull requests

2 participants