Skip to content

Commit

Permalink
Change the order of the pseudo-states in the pseudo selectors array (#…
Browse files Browse the repository at this point in the history
…45559)

* Move visited to start of array

Co-Authored-By: Stephen A. Bernhardt <[email protected]>

* Add comment

Co-authored-by: Stephen A. Bernhardt <[email protected]>
  • Loading branch information
mikachan and sabernhardt authored Nov 7, 2022
1 parent 2251a58 commit 41d5f4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ class WP_Theme_JSON_6_1 extends WP_Theme_JSON_6_0 {
* Define which defines which pseudo selectors are enabled for
* which elements.
* Note: this will effect both top level and block level elements.
*
* The order of the selectors should be: visited, hover, focus, active.
* This is to ensure that 'visited' has the lowest specificity
* and the other selectors can always overwrite it.
*/
const VALID_ELEMENT_PSEUDO_SELECTORS = array(
'link' => array( ':hover', ':focus', ':active', ':visited' ),
'button' => array( ':hover', ':focus', ':active', ':visited' ),
'link' => array( ':visited', ':hover', ':focus', ':active' ),
'button' => array( ':visited', ':hover', ':focus', ':active' ),
);

/**
Expand Down

0 comments on commit 41d5f4c

Please sign in to comment.