Improve webpage

This commit is contained in:
Talia 2024-12-18 15:40:19 +01:00
parent edf6d04137
commit 24f6741c0c
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -15,9 +15,31 @@
url('https://cdn.jsdelivr.net/gh/darkwiiplayer/css@main/schemes/talia.css') url('https://cdn.jsdelivr.net/gh/darkwiiplayer/css@main/schemes/talia.css')
layer(theme); layer(theme);
:root {
--color: #4af;
}
better-select { better-select {
color: black; background: var(--background);
background: white;
&::part(search) {
border-radius: 3px;
border: 1px solid var(--color);
}
&::part(search):focus {
outline: 2px solid color-mix(in hsl, var(--color), transparent 60%);
}
&:focus {
outline: 2px solid var(--color);
}
&:state(--open) {
outline: none;
}
&::part(item):focus {
color: var(--color);
background-color: color-mix(in hsl, var(--color), transparent 80%);
}
} }
md-block:not([rendered]) { display: none } md-block:not([rendered]) { display: none }
@ -28,12 +50,15 @@
<p>A better muli-option input box for HTML</p> <p>A better muli-option input box for HTML</p>
<better-select class="search"> <form onsubmit='event.preventDefault(); console.table(Object.fromEntries(new FormData(document.querySelector("form")).entries()))'>
<span slot="placeholder">Placeholder...</span> <better-select name="better-selection" class="search">
<option value="first">First value</option> <span slot="placeholder">Placeholder...</span>
<option value="second">Second value</option> <option value="first">First value</option>
<option value="third">Third value</option> <option value="second">Second value</option>
</better-select> <option value="third">Third value</option>
</better-select>
<button title="Log form data to dev console">Submit</button>
</form>
<vertical-spacer triple></vertical-spacer> <vertical-spacer triple></vertical-spacer>