Skip to content

Commit f36c7ca

Browse files
committed
refactor(combo): set item count in a CSS variable
1 parent b067021 commit f36c7ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/combo/themes/combo.base.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
@use 'styles/utilities' as *;
33

44
:host {
5+
--item-count: 6;
6+
57
display: block;
68
font-family: var(--ig-font-family);
79

@@ -73,7 +75,7 @@
7375
}
7476

7577
[part='list'] {
76-
min-height: calc(var(--size) * 6) !important;
78+
min-height: calc(var(--size) * var(--item-count)) !important;
7779
outline-style: none;
7880
}
7981

src/components/combo/themes/shared/combo.indigo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ $dropdown-theme: dropdown-theme.$indigo;
6262
}
6363

6464
[part='list'] {
65-
min-height: calc(var(--size) * 6 + rem(16px)) !important;
65+
min-height: calc(var(--size) * var(--item-count) + rem(16px)) !important;
6666
}
6767

6868
[part='filter-input'] {

0 commit comments

Comments
 (0)