Add part for default placeholder
This commit is contained in:
parent
2377d395c3
commit
4dfb800006
2 changed files with 5 additions and 1 deletions
|
@ -48,6 +48,10 @@ better-select {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&::part(placeholder) {
|
||||||
|
min-height: 1.4em;
|
||||||
|
}
|
||||||
|
|
||||||
&.search::part(search) {
|
&.search::part(search) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ export class BetterSelect extends HTMLElement {
|
||||||
<div id="display" part="display">
|
<div id="display" part="display">
|
||||||
<span part="display-text" id="text"></span>
|
<span part="display-text" id="text"></span>
|
||||||
<slot name="placeholder" aria-hidden="true">
|
<slot name="placeholder" aria-hidden="true">
|
||||||
<span id="placeholder" aria-hidden="true"></span>
|
<span part="placeholder" id="placeholder" aria-hidden="true"></span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<dialog id="dialog" part="drop-down">
|
<dialog id="dialog" part="drop-down">
|
||||||
|
|
Loading…
Reference in a new issue