-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
InspectorControls: Text not displayed when "Show button text labels" is enabled #61949
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. |
cc @DaniGuardiola who worked on #60560 |
Size Change: +23 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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.
Thank you @t-hamano, I agree that not relying in pseudo-elements is a better solution. The code looks good to me 👍
Thanks for the review! |
…is enabled (WordPress#61949) * InspectorControls: Text not displayed when "Show button text labels" is enabled * Don't rely on pseudo-elements Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org>
…is enabled (WordPress#61949) * InspectorControls: Text not displayed when "Show button text labels" is enabled * Don't rely on pseudo-elements Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org>
Fixes #61947
Seems to be caused by #60560
What?
This PR fixes an issue where tab text in InspectorControls is not displayed when "Show button text labels" is enabled.
Why?
When "Show button text labels" is enabled, text is often displayed using the following approach:
However, #60560 applied
opacity: 0;
to thebefore
pseudo-element, so the text is no longer visible.How?
Fortunately #60560 removed the
after
pseudo-element, so I changedbefore
toafter
. But this is a temporary fix for WP6.6. It may not be an ideal approach as it may be affected by changes to theTab
component in the future. Overall, we will need to consider the implementation itself if "Show button text labels" is enabled, as discussed in #61763.Testing Instructions