Skip to content

Commit 609b1af

Browse files
authored
fix: multi-select-combo-box-chip layout and forced color mode (#10164)
1 parent 1f9af1c commit 609b1af

File tree

6 files changed

+17
-3
lines changed

6 files changed

+17
-3
lines changed

packages/multi-select-combo-box/src/styles/vaadin-multi-select-combo-box-chip-base-styles.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export const multiSelectComboBoxChipStyles = css`
1313
justify-content: center;
1414
white-space: nowrap;
1515
box-sizing: border-box;
16-
gap: var(--vaadin-chip-gap, var(--vaadin-chip-padding, 0.3em));
16+
gap: var(--vaadin-chip-gap, 0);
1717
background: var(--vaadin-chip-background, var(--vaadin-background-container));
1818
color: var(--vaadin-chip-color, var(--vaadin-color));
19-
font-size: var(--vaadin-chip-font-size, 0.875em);
19+
font-size: max(11px, var(--vaadin-chip-font-size, 0.875em));
2020
font-weight: var(--vaadin-chip-font-weight, 500);
2121
line-height: var(--vaadin-input-field-value-line-height, inherit);
2222
padding: 0 var(--vaadin-chip-padding, 0.3em);
@@ -42,14 +42,17 @@ export const multiSelectComboBoxChipStyles = css`
4242
[part='label'] {
4343
overflow: hidden;
4444
text-overflow: ellipsis;
45+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
4546
}
4647
4748
[part='remove-button'] {
4849
flex: none;
4950
display: block;
50-
margin-inline: auto calc(var(--vaadin-chip-padding, 0.3em) * -1);
51+
margin-inline-start: auto;
52+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
5153
color: var(--vaadin-chip-remove-button-color, var(--vaadin-color-subtle));
5254
cursor: var(--vaadin-clickable-cursor);
55+
translate: 25%;
5356
}
5457
5558
[part='remove-button']::before {
@@ -110,4 +113,14 @@ export const multiSelectComboBoxChipStyles = css`
110113
:host([count='1'])::after {
111114
display: none;
112115
}
116+
117+
@media (forced-colors: active) {
118+
:host {
119+
border: 1px solid !important;
120+
}
121+
122+
[part='remove-button']::before {
123+
background: CanvasText;
124+
}
125+
}
113126
`;

packages/multi-select-combo-box/src/vaadin-multi-select-combo-box-container.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class MultiSelectComboBoxContainer extends InputContainer {
2828
width: 100%;
2929
min-width: 0;
3030
gap: var(--_wrapper-gap);
31+
align-self: start;
3132
}
3233
3334
:host([auto-expand-vertically]) #wrapper {
153 Bytes
Loading
13 Bytes
Loading
14 Bytes
Loading
2 Bytes
Loading

0 commit comments

Comments
 (0)