Skip to content
Merged
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)
- `Textarea`: Fix disabled styles [#77129](https://github.com/WordPress/gutenberg/pull/77129).
- `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)).
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: $components-color-gray-100;
border-color: $components-color-gray-400;
cursor: default;
opacity: 1;
Comment on lines +16 to +17

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.

Why where the cursor and opacity rules needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adding opacity was a misunderstanding. I'm removing it #77263

The cursor is to prevent it from switching to text if users cannot interact with the control.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I appreciate the post-merge review, btw.

}

&.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: $components-color-gray-100;
color: $components-color-gray-600;
}
}

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