-
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
Make Tabs have a fluid height #62027
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. |
This is looking good to me. |
Thank you for working on this, i'll take a look tomorrow |
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.
I went ahead and merged current trunk
to test it with the most recent indicator styles for orientation="vertical"
.
I found two pre-existing problems which I broke out into a separate issue/PR, if anyone else notices them too:
- Tabs: "With Tab Icons" story has duplicated focus styles #63271
- Tabs: Fix text-align when text wraps in vertical mode #63272
Otherwise, code changes look good to me 👍
feb0309
to
8baa662
Compare
Thanks all for your review and feedback. |
* Make Tabs fluid height. * Add changelog entry. Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
* Make Tabs fluid height. * Add changelog entry. Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
Fixes #62018
What?
The styling of the Tabs component doesn't take into account longer strings that wrap to multiple lines. The focus style overlaps the text and partially hides it.
Why?
Text should always be fully readable.
Fixed heights should be avoided as much as possible, to allow text to re-flow and adapt.
How?
box-shadow
andoutline
. The latter always works, also for Windows Hight Contrast Mode, and cam be styled exactly like the previous box-shadow.min-height
of 48 pixels.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Before:
After: