wukko 00cdb2121d
web: data-driven switcher & save mode switcher
also:
- disabled ssr to enable localstorage
- removed the workaround for hover, as it looks bad
2024-06-19 23:04:09 +06:00

35 lines
838 B
Svelte

<div id="switcher-container" class="switcher">
<slot></slot>
</div>
<style>
.switcher {
display: flex;
width: auto;
flex-direction: row;
flex-wrap: nowrap;
scrollbar-width: none;
overflow-x: scroll;
border-radius: var(--border-radius);
}
.switcher :global(.button:first-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.switcher :global(.button:last-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.switcher > :global(:not(.button:first-child):not(.button:last-child)) {
border-radius: 0;
}
/* clumsy hack to get rid of double border in a list of switches */
.switcher > :global(:not(.button:first-child)) {
margin-left: -1.5px;
}
</style>