Set default text/link colors for background color #49830
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
Needs Design Feedback
Needs general design feedback.
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
it would be great if I could optionally assign in theme.json the default color used for text or link, which would be automatically set if the user sets that default color as background.
Today, for example, if I have a light theme and I want to make an invert block, not only do I have to select a dark background color, but I also have to select a light color for text and links. And when a theme has a larger color palette, sometimes it's not easy for the average user to know which color matches (or is downright prescribed) for a given background color. It then forces developers to make lots of preset blocks. The ability to set default complementary colors would solve this
What is your proposed solution?
theme.json color section could be something like
"palette": [
{
"color": "#000",
"name": "Contrast",
"slug": "contrast",
"defaultTextColor": "#fff",
"defaultLinkColor": "#acc8eaff",
}
]
And when you select contract color as a background and you have not selected color for text or link, they will be automaticaly predefined with the default colors.
The text was updated successfully, but these errors were encountered: