Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

### Bug Fixes

- `Notice`: Fix low-contrast link/secondary action controls on dark theme backgrounds by pointing their accent color at the theme-aware `--wpds-color-foreground-interactive-brand` token.
- `SandBox`: Inject the resize script into the document `<head>` so an unclosed attribute quote in the sandboxed HTML can no longer swallow the script and leak its source as visible text in the preview. ([#79920](https://github.com/WordPress/gutenberg/pull/79920))
- `Divider`: Restore lower-specificity border styles so custom border colors can override the default divider color. ([#79534](https://github.com/WordPress/gutenberg/pull/79534))
- `Button`: Fix the focus ring for buttons rendered as links ([#79837](https://github.com/WordPress/gutenberg/pull/79837)).
Expand Down
13 changes: 13 additions & 0 deletions packages/components/src/notice/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@
margin-top: var(--wpds-dimension-gap-sm);
}

// The legacy `--wp-admin-theme-color` accent is a fixed value that does not
// adapt to the theme background. On the tinted, dark surfaces used in a dark
// theme, link/secondary/tertiary actions therefore fall below the minimum
// contrast ratio. Redirect the accent to the theme-aware brand foreground
// token for those variants — matching the outline/minimal treatment in the
// `@wordpress/ui` Button. Primary actions keep the accent as their fill, so
// they are intentionally excluded.
.components-notice__action:not(.is-primary) {
--wp-components-color-accent: var(--wpds-color-foreground-interactive-brand);
--wp-components-color-accent-darker-10: var(--wpds-color-foreground-interactive-brand-active);
--wp-components-color-accent-darker-20: var(--wpds-color-foreground-interactive-brand-active);
}

.components-notice__dismiss {
grid-column: 2;
grid-row: 1;
Expand Down
Loading