Equicord/src/components/Switch.css

84 lines
1.8 KiB
CSS
Raw Normal View History

.vc-switch-container {
2026-01-24 02:02:15 +01:00
display: flex;
align-items: center;
position: relative;
}
.vc-switch-indicator {
background: var(--switch-background-default);
border: 1px solid var(--switch-border-default);
border-radius: var(--radius-lg);
box-sizing: border-box;
cursor: pointer;
2026-01-24 02:02:15 +01:00
height: 24px;
position: relative;
2026-01-24 02:02:15 +01:00
width: 48px;
transition: background-color 200ms ease, border-color 200ms ease;
}
.vc-switch-checked .vc-switch-indicator {
background: var(--switch-background-selected-default);
border-color: var(--switch-border-selected-default);
}
2026-01-24 02:02:15 +01:00
.vc-switch-disabled {
cursor: not-allowed;
opacity: 0.5;
}
2026-01-24 02:02:15 +01:00
.vc-switch-disabled .vc-switch-indicator {
cursor: not-allowed;
}
2026-01-24 02:02:15 +01:00
.vc-switch-focusVisible .vc-switch-indicator {
box-shadow: 0 0 0 2px var(--border-focus, #00a8fc);
}
.vc-switch-container:hover .vc-switch-indicator {
2026-01-24 02:02:15 +01:00
background: var(--switch-background-hover);
border-color: var(--switch-border-hover);
}
.vc-switch-checked:hover .vc-switch-indicator {
2026-01-24 02:02:15 +01:00
background: var(--switch-background-selected-hover);
border-color: var(--switch-border-selected-hover);
}
.vc-switch-thumb {
align-items: center;
display: flex;
height: 24px;
justify-content: center;
left: 1px;
margin-left: -1px;
margin-top: -1px;
position: absolute;
2026-01-24 02:02:15 +01:00
width: 24px;
transition: left 150ms ease-in-out;
}
.vc-switch-checked .vc-switch-thumb {
left: 24px;
}
.vc-switch-checked .vc-switch-thumb rect {
fill: var(--switch-thumb-background-selected-default);
}
.vc-switch-input {
border-radius: 14px;
cursor: pointer;
height: 100%;
left: 0;
margin: 0;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
&:disabled {
pointer-events: none;
cursor: not-allowed
}
2026-01-24 02:02:15 +01:00
}