-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Fractional RBG values are not supported anymore @3.0.0-pre.5 #2550
Comments
Probably related to the css color parser... |
Probably introduced here: maplibre/maplibre-style-spec#94 |
The CSS Color 3 specification specifies that the numbers in rgb function should be integers. Library According to the CSS Color 4 specification, the extra precision in the |
I looked into this and realized that the So if we want a css color parser without unnecessary additions (other color spaces, serialization, etc.), maximally compliant with the css specification, over which we have full control there is nothing left but to write our own :D |
If we can't find a library that does the trick for us, then writing our own is three only thing left to do, but we need to make sure this is the case, as I see it as a last resort. |
I have not been able to find the perfect library, I think we could give it a try. Let's wait until the expression tests are migrated to maplibre-style-spec #97, check if the tests pass with the new parser and then decide what to do next. And maybe someone will find a better parsing library in the meantime :) |
@kajkal , this expression test migration PR you mentioned is put on hold a bit, because consultation with the Native team mean that we could take a different approach here. |
I think this parce-css-color POC, at least until color-string catches up, is a better option for us if the alternative is to introduce a hard-to-find breaking change in 3.0.0. We should make sure our tests suite catches this going forward, so it's easy to re-assess color-string compatibility in half a year or so - and it would be a good idea to have an issue to remind us about that, in case it's possible to reduce the codebase again. |
@kajkal , if you are somewhat certain that there are no other libraries out there that does this, then a PR for this would be greatly appreciated so it can be included in the soon-to-be-released 3.0 release of MapLibre GL JS. |
@birkskyum I created PR #175 |
Thanks! |
closed by maplibre/maplibre-style-spec#175 |
Issue
Fractional RGB value is not supported starting pre.5. If its expected, then may be just need to update the change log to document it.
Previouly: "rgb(200,0.5,0)" was a valid input, not anymore.
maplibre-gl-js version: From 3.0.0-pre.5.
browser: All
Link to Demonstration
Broken with @3.0.0-pre.5 Repro link: https://jsbin.com/yejeqomoba/edit?html,console,output
Works @3.0.0-pre.4 Repro link: https://jsbin.com/milicoluxu/1/edit?html,output
PR which potentially caused it: #2376
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: