Add activation toggle pattern with inline an/aus chip
This commit is contained in:
@@ -1769,6 +1769,70 @@ section + section {
|
||||
}
|
||||
}
|
||||
|
||||
/* ========================================================= */
|
||||
/* Patterns: Aktivierungs-Schalter */
|
||||
/* ========================================================= */
|
||||
|
||||
.sg-activation-toggle-pattern {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-small);
|
||||
}
|
||||
|
||||
.sg-activation-toggle-pattern__label {
|
||||
margin: 0;
|
||||
color: var(--text-control-default);
|
||||
}
|
||||
|
||||
.sg-activation-toggle-chip {
|
||||
position: relative;
|
||||
display: inline-grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
align-items: center;
|
||||
min-width: calc(var(--layout-mode-toggle-local-height) * 3);
|
||||
height: var(--layout-mode-toggle-local-height);
|
||||
padding: var(--border-width-thin);
|
||||
border: var(--border-none);
|
||||
border-radius: var(--radius-interaction);
|
||||
background: var(--surface-toggle-track);
|
||||
color: var(--text-control-default);
|
||||
font-family: var(--font-family-base);
|
||||
font-size: var(--font-size-small);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.sg-activation-toggle-chip::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: var(--border-width-thin);
|
||||
left: var(--border-width-thin);
|
||||
width: calc(50% - var(--border-width-thin));
|
||||
height: calc(100% - (var(--border-width-thin) * 2));
|
||||
border-radius: calc(var(--radius-interaction) - var(--border-width-thin));
|
||||
background: var(--surface-toggle-handle);
|
||||
transition: transform 160ms ease;
|
||||
}
|
||||
|
||||
.sg-activation-toggle-chip[data-active="an"]::before {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.sg-activation-toggle-chip__text {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.sg-activation-toggle-chip:focus,
|
||||
.sg-activation-toggle-chip:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* ========================================================= */
|
||||
/* Patterns: Object Card */
|
||||
/* ========================================================= */
|
||||
|
||||
Reference in New Issue
Block a user