Skip to content

Commit

Permalink
Tabs: Fix text-align when text wraps in vertical mode (WordPress#63272)
Browse files Browse the repository at this point in the history
* Tabs: Fix text-align when text wraps in vertical mode

* Add changelog

Co-authored-by: mirka <[email protected]>
Co-authored-by: DaniGuardiola <[email protected]>
  • Loading branch information
3 people authored and carstingaxion committed Jul 18, 2024
1 parent 34b7fe3 commit d414366
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- `UnitControl`: Fix an issue where keyboard shortcuts unintentionally shift focus on Windows OS. ([#62988](https://github.com/WordPress/gutenberg/pull/62988))
- Fix inaccessibly disabled `Button`s ([#62306](https://github.com/WordPress/gutenberg/pull/62306)).
- `TimePicker`: Fix time zone overflow ([#63209](https://github.com/WordPress/gutenberg/pull/63209)).
- `Tabs`: Fix text-align when text wraps in vertical mode ([#63272](https://github.com/WordPress/gutenberg/pull/63272)).

### Internal

Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/tabs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ export const TabListWrapper = styled.div`
display: flex;
align-items: stretch;
flex-direction: row;
text-align: center;
&[aria-orientation='vertical'] {
flex-direction: column;
text-align: start;
}
@media not ( prefers-reduced-motion: reduce ) {
&.is-animation-enabled::after {
transition-property: left, top, width, height;
Expand Down Expand Up @@ -70,6 +74,7 @@ export const Tab = styled( Ariakit.Tab )`
padding: ${ space( 4 ) };
margin-left: 0;
font-weight: 500;
text-align: inherit;
&[aria-disabled='true'] {
cursor: default;
Expand Down

0 comments on commit d414366

Please sign in to comment.