Place activation toggle labels inside switch track

This commit is contained in:
2026-05-23 08:21:35 +02:00
parent 70940aa7c0
commit 6452ec5a76
2 changed files with 30 additions and 10 deletions
+2 -4
View File
@@ -495,13 +495,11 @@
<div class="sg-activation-toggle-pattern">
<button class="sg-mode-toggle sg-mode-toggle--local sg-activation-mode-toggle" type="button" data-active="absolute" aria-label="Aktivierung: aus">
<span class="sg-mode-toggle__label sg-activation-mode-toggle__label">aus</span>
<span class="sg-mode-toggle__switch" aria-hidden="true" data-component-part="toggle-track">
<span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--left">aus</span>
<span class="sg-activation-mode-toggle__switch-label sg-activation-mode-toggle__switch-label--right">an</span>
<span class="sg-mode-toggle__handle" data-component-part="toggle-handle"></span>
</span>
<span class="sg-mode-toggle__label sg-activation-mode-toggle__label">an</span>
</button>
</div>
</section>
+28 -6
View File
@@ -1779,14 +1779,36 @@ section + section {
gap: var(--spacing-small);
}
.sg-activation-mode-toggle__label {
display: inline-block !important;
visibility: visible !important;
opacity: 1 !important;
color: var(--color-darkblue) !important;
.sg-activation-mode-toggle {
gap: 0;
}
.sg-activation-mode-toggle .sg-mode-toggle__switch {
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
overflow: hidden;
}
.sg-activation-mode-toggle .sg-mode-toggle__handle {
z-index: 1;
}
.sg-activation-mode-toggle__switch-label {
position: relative;
z-index: 2;
text-align: center;
font-family: var(--font-family-base);
font-size: var(--font-size-base);
line-height: var(--line-height-base);
font-weight: var(--font-weight-regular);
line-height: var(--layout-mode-toggle-local-height);
text-transform: lowercase;
color: var(--text-control-default);
}
.sg-activation-mode-toggle[data-active="absolute"] .sg-activation-mode-toggle__switch-label--left,
.sg-activation-mode-toggle[data-active="relative"] .sg-activation-mode-toggle__switch-label--right {
color: var(--color-font-light);
}
/* ========================================================= */