You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Link Color: substitute the CSS Custom Property by the mechanism used in layout and duotone #31488
CSS StylingRelated to editor and front end styles, CSS-specific issues.Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
The link color is an experimental feature a theme can opt-in. At the user level, it works by attaching --wp--style--color--link: <user selected value> to the block wrapper. At the global level, it works by outputting a new ruleset such as block selector { --wp--style--color--link: <theme_or_user_value>}. They work because the framework also outputs this rule <selector for links> { color: var(--wp--style--color--link, <fallback value>}, which we enqueue when the theme has support for theme.json or has opted-in for link color.
The link color is experimental for a few reasons, such as that it doesn't work for roles without unfiltered_html capabilities #25151 and that we were exploring how to target the inner contents of a block. The current iteration for inner block markup focus on two efforts: allowing blocks to serialize themselves the style properties to parts of its markup they want #28913 and the introduction of elements as a way to target structured inner elements via theme.json #29891 Additionally, we've recently introduced a mechanism to render some styles in the server and collocate <style> tags with the block that uses them, see layout #29335 and duotone #26752
With all this new data, we have an opportunity to improve and simplify how the link color works by making it work like layout and duotone and tapping into the elements mechanism.
CSS StylingRelated to editor and front end styles, CSS-specific issues.Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
Activity