[wp-trac] [WordPress Trac] #57053: Themes: Support additional link related pseudo classes in `theme.json`.
WordPress Trac
noreply at wordpress.org
Wed Nov 9 23:31:37 UTC 2022
#57053: Themes: Support additional link related pseudo classes in `theme.json`.
---------------------------+-----------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords: needs-patch
Focuses: css |
---------------------------+-----------------------------
`class-wp-theme-json.php` is currently missing the `:link` and `:any-link`
pseudo classes as valid selectors:
{{{#!php
<?php
const VALID_ELEMENT_PSEUDO_SELECTORS = array(
'link' => array( ':visited', ':hover', ':focus', ':active' ),
'button' => array( ':visited', ':hover', ':focus', ':active' ),
);
}}}
`:link` can be used to [https://developer.mozilla.org/en-
US/docs/Web/CSS/:link style unvisited links] and has wide browser support;
`:any-link` can be used to [https://developer.mozilla.org/en-
US/docs/Web/CSS/:any-link style links containing an `href` attribute] but
is unsupported in Safari browsers.
Similar to the issue faced in #56928, order is important. These would need
to be added at the start of the lists.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57053>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list