[spaces/helmgenlch] Add cssId for color() serialization#731
Open
Grkmyldz148 wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for colorjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Without cssId, HelmGenLCh fell back to space.id ("helmgenlch") which
lacks the dashed-ident prefix required by CSS Color Module Level 4
for custom color() spaces. The serializer produced an invalid
"color(helmgenlch ...)" instead of "color(--helmgenlch ...)".
Adds cssId: "--helmgenlch" matching the convention used by sibling
spaces (--helmgen, --helmlab-metric).
Also adds regression coverage in test/serialize.js for the dashed-ident
output across all three custom Helm color() spaces.
Fixes color-js#730
Co-Authored-By: Claude <noreply@anthropic.com>
3e499ed to
b68bd4d
Compare
Contributor
Author
LeaVerou
approved these changes
May 7, 2026
Member
|
Approved, thanks! If you're feeling particularly generous with your time, you could take a stab at codifying #723 in |
Contributor
Author
|
Thanks! I’ll definitely do that 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
cssId: "--helmgenlch"to the HelmGenLCh color space registration. Without it, the serializer fell back tospace.id("helmgenlch") and produced an invalidcolor(helmgenlch …)— CSS Color Module Level 4 requires a dashed-ident for customcolor()spaces.The chosen identifier (
--helmgenlch) mirrors the convention already used by the sibling spaces (--helmgen,--helmlab-metric).Test plan
npm test— all 770 tests pass (4 new, 0 regressions)npx eslintclean on changed filesnpx prettier --checkcleanAdded regression coverage in
test/serialize.jsfor the dashed-ident output ofhelmgen,helmgenlch, andhelmlab-metric(with and without alpha) so this can't silently regress again.Fixes #730