Skip to content

Commit

Permalink
fix: readonly select value should use secondary text color (#3606)
Browse files Browse the repository at this point in the history
  • Loading branch information
sissbruecker committed Mar 28, 2022
1 parent dd30f82 commit 1d73239
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/select/test/visual/lumo/select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('select', () => {
});

it('readonly', async () => {
element.value = 'item 1';
element.readonly = true;
await visualDiff(div, 'readonly');
});
Expand Down
4 changes: 4 additions & 0 deletions packages/select/theme/lumo/vaadin-select-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const select = css`
color: var(--lumo-body-text-color);
}
:host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
color: var(--lumo-secondary-text-color);
}
/* placeholder styles */
[part='input-field'] ::slotted([slot='value'][placeholder]) {
color: inherit;
Expand Down

0 comments on commit 1d73239

Please sign in to comment.