-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Elements: Make editor selector match theme.json and frontend #59167
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +14 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Flaky tests detected in 62c4e69. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7956105590
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR:
2024-02-21.10.10.14.mp4
Trunk:
Therefore, is this change worth the extra little bit of bloat to the CSS?
I can only offer my opinion. I like things when they're consistent. That's why I repeatedly buy the same shoes and briefs - I want to know what I'm stepping into. More germane to this issue, I think having consistent classnames assists debugging, especially when switching between frontend and editor.
Partially addresses issue flagged in: #59163
What?
Makes the link element selector consistent between theme.json, the frontend elements block support, and the site editor.
Note: There should be no functional change in the editor as the editor currently renders buttons as
div
elements for the rich text editing, so haven't run into the conflict with links styles like the frontend did.Therefore, is this change worth the extra little bit of bloat to the CSS?
Why?
The selector used should be consistent unless there is a good reason not to be. Being consistent here might mean avoiding unexpected issues down the line if the way element styles are handled changes.
How?
Make the JS selector consistent with the one in theme.json and the elements block support.
Testing Instructions
a:where(:not(.wp-element-button))
selector