Skip to content

Commit

Permalink
Tabs: keep full opacity of focus ring on disabled tabs (WordPress#63754)
Browse files Browse the repository at this point in the history
* Tabs: keep full opacity of focus ring on disabled tabs

* CHANGELOG

* Use lighter shade of gray, use semantic variable

* Do not apply hover styles to disabled tabs

* Update CHANGELOG

---

Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored Jul 23, 2024
1 parent 4b28aca commit e9e27b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- `DropdownMenuV2`: invert animation direction. ([#63443](https://github.com/WordPress/gutenberg/pull/63443)).
- `Tabs`: Vertical Tabs should be 40px min height. ([#63446](https://github.com/WordPress/gutenberg/pull/63446)).
- `ColorPicker`: Use `minimal` variant for `SelectControl` ([#63676](https://github.com/WordPress/gutenberg/pull/63676)).
- `Tabs`: keep full opacity of focus ring and remove hover styles on disabled tabs ([#63754](https://github.com/WordPress/gutenberg/pull/63754)).

### Documentation

Expand Down
5 changes: 3 additions & 2 deletions packages/components/src/tabs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ export const Tab = styled( Ariakit.Tab )`
font-weight: 500;
text-align: inherit;
hyphens: auto;
color: ${ COLORS.theme.foreground };
&[aria-disabled='true'] {
cursor: default;
opacity: 0.3;
color: ${ COLORS.ui.textDisabled };
}
&:hover {
&:not( [aria-disabled='true'] ):hover {
color: ${ COLORS.theme.accent };
}
Expand Down

0 comments on commit e9e27b9

Please sign in to comment.