Skip to content

Conversation

@Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Nov 8, 2022

Backports changes from WordPress/gutenberg#45559

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.

Props: @mikachan, @sabernhardt, @getdave (get_dave).

Trac ticket: https://core.trac.wordpress.org/ticket/56928


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@desrosj
Copy link
Member

desrosj commented Nov 8, 2022

Thanks @Mamaduka! I changed the ticket description to point to Trac-56928 since that ticket is specific to this issue/change.

Copy link
Member

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but let's include the Trac ticket link for additional context as to why the selectors are ordered as such. I can add this comment when committing, but wanted to make sure you agreed.

Also, I'm indifferent as to whether this needs to be synced to the Gutenberg plugin as that class should disappear in a few releases. But it may be good for consistency.

Co-authored-by: Jonathan Desrosiers <[email protected]>
@Mamaduka
Copy link
Member Author

Mamaduka commented Nov 8, 2022

Thank you, @desrosj. The Trac ticket link makes sense to me, I will port changes back to the plugin for consistency 👍

Copy link
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, matches the long term LoVe(F)HA rule.

@peterwilsoncc
Copy link
Contributor

@Mamaduka
Copy link
Member Author

Mamaduka commented Nov 9, 2022

Thank you, @peterwilsoncc.

Now the only thing left is to cherry-pick the commit for the 6.1 branch.

@Mamaduka Mamaduka deleted the backport/pseudo-selectors-reorder branch November 9, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants