Skip to content

Commit 204aa52

Browse files
committed
fix(core): size height calculation
- only set explicit computed height when size is applied, prevents specificity and rounding errors on standard single selects Signed-off-by: Cory Rylan <crylan@nvidia.com>
1 parent 4601239 commit 204aa52

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

‎projects/core/.visual/select.png‎

Lines changed: 2 additions & 2 deletions
Loading

‎projects/core/src/select/select.css‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
--_icon-color: var(--color);
2424
--_gap: var(--gap);
2525
--size: 1;
26-
--_row-height: calc(var(--height) *var(--size) +var(--gap) * (var(--size) - 1));
27-
--_height: calc(var(--_row-height) +var(--nve-ref-border-width-md) * 2);
26+
--_height: var(--height);
2827
contain: initial;
2928
width: var(--width);
3029
max-width: var(--max-width);
@@ -139,6 +138,11 @@
139138
opacity:0!important;
140139
}
141140

141+
:host(:state(size)) {
142+
--_row-height:calc(var(--height) *var(--size) +var(--gap) * (var(--size) -1));
143+
--_height:calc(var(--_row-height) +var(--nve-ref-border-width-md) *2);
144+
}
145+
142146
:host(:state(size)) [input] {
143147
overflow: auto;
144148
display: block;

0 commit comments

Comments
 (0)