Skip to content

Commit

Permalink
Changing Button component toggled style selector (#55065)
Browse files Browse the repository at this point in the history
* Changing `Button` component toggled style selector

Reverting change from class to attribute selector, until we can better assess how the `is-pressed` class is used elsewhere.

* Updating CHANGELOG.md
  • Loading branch information
Andrew Hayward authored Oct 6, 2023
1 parent 1d6e92b commit 030e2cf
Show file tree
Hide file tree
Showing 2 changed files with 2 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 @@ -28,6 +28,7 @@
- `Button`: Remove `aria-selected` CSS selector from styling 'active' buttons ([#54931](https://github.com/WordPress/gutenberg/pull/54931)).
- `Popover`: Apply the CSS in JS styles properly for components used within popovers. ([#54912](https://github.com/WordPress/gutenberg/pull/54912))
- `Button`: Remove hover styles when `aria-disabled` is set to `true` for the secondary variant. ([#54978](https://github.com/WordPress/gutenberg/pull/54978))
- `Button`: Revert toggled style selector to use a class instead of attributes ([#55065](https://github.com/WordPress/gutenberg/pull/55065)).

### Internal

Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@
}

// Toggled style.
&[aria-pressed="true"],
&[aria-pressed="mixed"] {
&.is-pressed {
color: $components-color-foreground-inverted;
background: $components-color-foreground;

Expand Down

1 comment on commit 030e2cf

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 030e2cf.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6428873613
📝 Reported issues:

Please sign in to comment.