Skip to content
Open
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 @@ -4,6 +4,7 @@

### Bug Fixes

- `FormTokenField`: Fix disabled styles. [#77137](https://github.com/WordPress/gutenberg/pull/77137)
- `Autocomplete`: Fix value comparison to avoid resetting block inserter in RTC ([#76980](https://github.com/WordPress/gutenberg/pull/76980)).
- `ValidatedRangeControl`: Fix `aria-label` rendered as `[object Object]` when `required` or `markWhenOptional` is set ([#77042](https://github.com/WordPress/gutenberg/pull/77042)).
- `Autocomplete`: Fix matching logic to prefer longest overlapping trigger ([#77018](https://github.com/WordPress/gutenberg/pull/77018)).
Expand Down
14 changes: 12 additions & 2 deletions packages/components/src/form-token-field/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
cursor: text;

&.is-disabled {
background: $gray-300;
border-color: $gray-300;
background: $gray-100;
border-color: $gray-400;
Comment on lines +14 to +15
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

These disabled colors use raw $gray-* tokens even though this stylesheet already imports theme-variables and uses $components-color-* elsewhere. Using $components-color-gray-100 / $components-color-gray-400 here would respect the --wp-components-color-gray-* CSS variables and keep theming behavior consistent with other controls that rely on semantic/themable tokens.

Suggested change
background: $gray-100;
border-color: $gray-400;
background: $components-color-gray-100;
border-color: $components-color-gray-400;

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed with Copilot

cursor: default;
opacity: 1;
}

&.is-active {
Expand Down Expand Up @@ -82,6 +84,14 @@
}
}

&.is-disabled {
.components-form-token-field__token-text,
.components-form-token-field__remove-token.components-button {
background: $gray-100;
color: $gray-600;
Comment on lines +90 to +91
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

Same theming concern here: $gray-100 / $gray-600 are hard-coded palette values. Consider switching to $components-color-gray-100 / $components-color-gray-600 so the disabled token pills follow any --wp-components-* color overrides, matching the theme-ready behavior used by other components.

Suggested change
background: $gray-100;
color: $gray-600;
background: $components-color-gray-100;
color: $components-color-gray-600;

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same

}
}

&.is-borderless {
position: relative;
padding: 0 24px 0 0;
Expand Down
Loading