Repository navigation
Conversation
The hue channel checked the lightness token, so lch(none 50 180) dropped 180.
Member
|
Please follow the guidelines. |
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.
parse_color("lch(none 50 180)")returned(None, 50, None). The hue is 180.oklch(none 0.1 180)dropped the hue the same way.lab(none 10 20)already keeps 20, andlch(40 20 180)already keeps 180. The hue check looked at the lightness token, so a missing lightness hid a hue that was present.lch(50 20 none)came back as hue 0. That is a real hue, not a missing one. It is nownone.Fixes #80.
Test plan
pytest tests/test_tinycss2.py::test_lch_none_lightness_keeps_hue tests/test_tinycss2.py::test_color_lch_4 tests/test_tinycss2.py::test_color_oklch_4 tests/test_tinycss2.py::test_color_lab_4(4501 passed)Drafted with Grok 4.7. The code has not yet been reviewed by a human.