Repository navigation
Hide block style variations when state is enabled in global styles - #80341
Conversation
There was a problem hiding this comment.
It looks like this also hides the style variations buttons if Hover is selected. However, it's possible on trunk to style the Hover style variation of the Button block:
That said, it's not necessarily a blocker as you can still click into Outline before selecting "Hover", and then once you're in the Outline variation select the "Hover" state. Also, because the selected pseudo state doesn't survive a navigation change, if a user is on "Hover" when at the parent level of the Button block, they'll have to reselect Hover anyway once they go into the Outline style variation.
So, IMO not a big deal to hide the variations panel if any state is selected. Just thought I'd mention it if it feels like a concern or if there's a simple way to hide only if it's a viewport selected.
Here's a video of the above behaviour:
2026-07-16.15.16.05.mp4
Tentative LGTM 😄
|
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. |
This also happens with the other states: if you're on tablet and select a variation, you then have to re-select tablet once in it. It makes me think it's better to hide the variations if a state is selected so the path to styling a variation is unambiguous. |
commented
Jul 16, 2026
Sounds good to me! In that case, my tentative LGTM is now simply a normal LGTM 😄 |
commented
Jul 16, 2026
|
Size Change: 0 B Total Size: 7.72 MB |
commented
Jul 16, 2026
|
I just cherry-picked this PR to the wp/7.1 branch to get it included in the next release: f836355 |
commented
Jul 21, 2026
|
I just cherry-picked this PR to the release/23.6 branch to get it included in the next release: 7525db2 |
What?
Quick fix for something I noticed while testing #80339
Testing Instructions
Default state:
Non-default state: