Custom CSS Color 4 compliant css color parser #175
Merged
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.
Strict CSS color parser compliant with CSS Color 4 Specification.
maplibre-gl-js #2550
Main features:
rgb(50% 0% 0%)
is equal torgb(127.5 0 0)
notrgb(127 0 0)
orrgb(128 0 0)
rgb(50% 0 0)
andrgb(50%,0% 0%)
are treated as invalidDifferences with the specification:
grad
,rad
orturn
angle units:hsl(.25turn 50% 50%)
is not supportednone
keyword:rgb(128 none none)
is not supportedrgb(/* R */ 10%, /* G */ 20%, /* B */ 30%)
is not supportedIf anyone were to ask, I checked the regexes for catastrophic backtracking - they are safe.
Launch Checklist
CHANGELOG.md
under the## main
section.