91 lines
2.1 KiB
CSS
91 lines
2.1 KiB
CSS
.blc-ldt-toggle {
|
|
position: fixed;
|
|
/* Position, offsets, and z-index are set via inline settings CSS. */
|
|
right: 1.25rem;
|
|
bottom: 1.25rem;
|
|
z-index: 999999;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.5rem 0.65rem 0.5rem 0.5rem;
|
|
border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
|
border-radius: 999px;
|
|
background: var(--theme-palette-color-8, #ffffff);
|
|
color: var(--theme-palette-color-1, #1a1a1a);
|
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
|
|
font: 600 0.8125rem/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
cursor: pointer;
|
|
transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease, color 0.2s ease;
|
|
}
|
|
|
|
.blc-ldt-toggle:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
|
|
}
|
|
|
|
.blc-ldt-toggle:focus-visible {
|
|
outline: 2px solid var(--theme-palette-color-1, #442b79);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.blc-ldt-toggle__track {
|
|
position: relative;
|
|
width: 2.5rem;
|
|
height: 1.375rem;
|
|
border-radius: 999px;
|
|
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.blc-ldt-toggle__thumb {
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
width: calc(1.375rem - 4px);
|
|
height: calc(1.375rem - 4px);
|
|
border-radius: 50%;
|
|
background: var(--theme-palette-color-1, #442b79);
|
|
transition: transform 0.25s ease;
|
|
}
|
|
|
|
.blc-ldt-toggle--dark .blc-ldt-toggle__thumb {
|
|
transform: translateX(1.125rem);
|
|
}
|
|
|
|
.blc-ldt-toggle__icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
html:not(.theme-dark) .blc-ldt-toggle__icon--moon,
|
|
html.theme-dark .blc-ldt-toggle__icon--sun {
|
|
display: none;
|
|
}
|
|
|
|
html.theme-dark .blc-ldt-toggle {
|
|
background: var(--theme-palette-color-7, #1a1a1a);
|
|
color: var(--theme-palette-color-4, #f5f5f5);
|
|
border-color: rgba(255, 255, 255, 0.12);
|
|
}
|
|
|
|
/* Avoid overlap with Blocksy back-to-top button */
|
|
.ct-back-to-top ~ .blc-ldt-toggle,
|
|
#ct-back-to-top ~ .blc-ldt-toggle {
|
|
bottom: 4.5rem;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.blc-ldt-toggle {
|
|
right: 1rem;
|
|
bottom: 1rem;
|
|
padding: 0.45rem;
|
|
}
|
|
|
|
.blc-ldt-toggle__icon {
|
|
display: none;
|
|
}
|
|
}
|