69 lines
1.1 KiB
Plaintext
69 lines
1.1 KiB
Plaintext
---
|
|
|
|
---
|
|
|
|
<div class="toggles">
|
|
<div>
|
|
<input id="sans-serif-toggle" type="checkbox" x-model="serifs" />
|
|
<label for="sans-serif-toggle">Serifs</label>
|
|
</div>
|
|
<div>
|
|
<input id="dark-mode-toggle" type="checkbox" x-model="darkMode" />
|
|
<label for="dark-mode-toggle">Dark Mode</label>
|
|
</div>
|
|
</div>
|
|
|
|
<style lang="scss">
|
|
@use '../styles/variables.scss' as *;
|
|
|
|
.toggles {
|
|
padding: 1rem;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 12px;
|
|
|
|
div {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
}
|
|
|
|
input {
|
|
position: relative;
|
|
appearance: none;
|
|
height: 24px;
|
|
width: 38px;
|
|
padding: 10px;
|
|
background-color: var(--orange);
|
|
border-radius: 120px;
|
|
|
|
&:checked {
|
|
background-color: var(--sky);
|
|
}
|
|
|
|
&:after {
|
|
content: '';
|
|
position: absolute;
|
|
height: 22px;
|
|
width: 22px;
|
|
border-radius: 100%;
|
|
background-color: var(--background);
|
|
left: 1px;
|
|
top: 1px;
|
|
transition: $quick-transition;
|
|
}
|
|
|
|
&:checked:after {
|
|
left: 15px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 516px) {
|
|
.toggles {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
</style>
|