Use of #rrggbbaa hex format for colors unnecessarily excludes older browsers #41358
Labels
Browser Issues
Issues or PRs that are related to browser specific problems
[Feature] Colors
Color management
[Type] Feedback
Issues that relate purely to feedback on a feature that isn't necessarily actionable
Description
Colors are output as hex values with transparency (
#rrggbbaa
) when using the new opacity control1:This format has less support than
rgba()
(~92% of recorded traffic compared to presumably almost 100%) and offers no tangible benefit over it. Absent that,rgba()
should be preferred.Additionally,
rgba()
is already what is generated for custom gradients:Simple color fills should behave the same way.
Step-by-step reproduction instructions
Set a color on a block, adjust the opacity, and look at the resulting markup.
Environment info
WordPress 6.0
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Footnotes
And possibly other places I haven't noticed? ↩
The text was updated successfully, but these errors were encountered: