Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Styles: Update the order of pseudo selectors #3582

Closed

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
Contributor

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
Contributor

@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.

src/wp-includes/class-wp-theme-json.php Show resolved Hide resolved
Co-authored-by: Jonathan Desrosiers <desrosj@users.noreply.github.com>
@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