Add part for default placeholder

This commit is contained in:
Talia 2024-12-19 15:19:32 +01:00
parent 2377d395c3
commit 4dfb800006
2 changed files with 5 additions and 1 deletions

View file

@ -48,6 +48,10 @@ better-select {
display: none;
}
&::part(placeholder) {
min-height: 1.4em;
}
&.search::part(search) {
display: block;
}

View file

@ -134,7 +134,7 @@ export class BetterSelect extends HTMLElement {
<div id="display" part="display">
<span part="display-text" id="text"></span>
<slot name="placeholder" aria-hidden="true">
<span id="placeholder" aria-hidden="true"></span>
<span part="placeholder" id="placeholder" aria-hidden="true"></span>
</slot>
</div>
<dialog id="dialog" part="drop-down">