-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
Support CSS color module level 4 #1630
Comments
Hi! That’s a feature introduced in CSS color module 4. |
It will require some work in Kozea/tinycss2#47. |
If anyone is interested in implementing this feature, I’ll be happy to help! That’s a fun feature to learn more about web specifications, and it shouldn’t be too difficult to get nice results with a small amount of code lines. |
Hello Apparently to fix this issue following function need to be fix: But I understand also that |
Actually, we should keep the It’s safe to implement almost everything from this specification. Even if it’s only a working draft, some of its features are already implemented in other browsers, it shouldn’t change much in the future. Libraries using tinycss2 will be free to use the version they want. |
color4 seems far more complex than color3. In particular there is support for Device-independent colors and Predefined Color Space Where the purpose if I understand it well is to have high fidelity color rending on device : monitor in case you read you document on a calibrated screen or on paper-ink-printer to preserve author intent. Can such application be supported by PDF and WeasyPrint ? I may be wrong but I guess today only RGBA is supported and everything is converted to RGBA. With Color4 I understand that the specified color space should end-up in the pdf document. |
Yes, it is.
Unfortunately, you’re wrong. CMYK support, for example, would be very useful for WeasyPrint.
There are three different steps. The first step is to handle the syntax in The second part is to use The third part is to include new features, in the future. We’ll answer these questions then.(Spoiler alert: they are useful, for example for PDF/A support that can require default ICC profiles to be embedded. That’s just an example, CMYK being another obvious one.)
Do you imply that implementing countless CSS specifications, HTML, PDF generation or SVG rendering doesn’t require sharp knowledge 😁? We can learn, as we always do. More seriously, we don’t want to handle everything in WeasyPrint right now. We only need the two first steps, and they are the easiest ones.
I wouldn’t assume that CMYK is only used by "very few users" in the print industry 😁. And among the 7 million downloads of tinycss2 last month, it’s probably possible to find a few users that would benefit from a clean support of the level 4 syntax. |
When using a color value without commas (like
style="color: hsl(180 100% 50%);"
), the resulting color is black. While color values with a comma (likestyle="color: hsl(180, 100%, 50%);"
) work as expected.Both should give the same results: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl
The text was updated successfully, but these errors were encountered: