davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
402 stars 33 forks source link

Add `print-color-adjust` declaration #519

Closed johnhaley81 closed 3 weeks ago

johnhaley81 commented 4 weeks ago

👋

I'm working on a feature that requires the background colors of divs to show up during printing and I can add -webkit-print-color-adjust declarations but the non-webkit version doesn't compile:

image

davesnx commented 4 weeks ago

I asume using print-color-adjust alone isn't sufficient?

johnhaley81 commented 4 weeks ago

So I just tested this in FF/Safari/Chrome on OSX and print-color-adjust: exact without the vendor prefix works on all of them so that might be sufficient. I have not tested this on windows/linux however.

davesnx commented 3 weeks ago

Sounds good. Autoprefixing works by emotion at client runtime (and if SSR by us), this will be done by us in the future as well (when we remove emotion).

No need to parse -webkit- and other prefixed properties from our parser. Closing this!