v0.38.4
This commit is contained in:
1 parent
9e81cce271
commit
185d5da6f9
31 files changed
+296
-199
No files matched your search
@@ -1146,6 +1146,65 @@ html[data-dashboard-density=compact] #panel-overview .dashboard-overview-grid>.c
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* On/off switch: an ordinary checkbox with class "switch". Used for settings
|
||||
that turn a feature or section on; option lists, row selection and risk
|
||||
confirmations stay plain checkboxes. The account preference
|
||||
switch_controls=false (html[data-switch-controls="false"]) keeps the plain
|
||||
checkbox look. */
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch {
|
||||
--rp-switch-h: calc(var(--ui-check-size) + 1px);
|
||||
--rp-switch-w: calc(var(--rp-switch-h) * 1.875);
|
||||
--rp-switch-knob: calc(var(--rp-switch-h) - 6px);
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
position: relative;
|
||||
flex: 0 0 var(--rp-switch-w);
|
||||
width: var(--rp-switch-w);
|
||||
min-width: var(--rp-switch-w);
|
||||
height: var(--rp-switch-h);
|
||||
min-height: var(--rp-switch-h);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid var(--field-line);
|
||||
border-radius: min(var(--rp-switch-h), var(--rp-radius-control, 3px));
|
||||
background: var(--field-bg);
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
transition: background-color .12s ease, border-color .12s ease;
|
||||
}
|
||||
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: var(--rp-switch-knob);
|
||||
height: var(--rp-switch-knob);
|
||||
border-radius: max(0px, calc(min(var(--rp-switch-h), var(--rp-radius-control, 3px)) - 2px));
|
||||
background: var(--muted);
|
||||
transition: transform .12s ease, background-color .12s ease;
|
||||
}
|
||||
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch:checked {
|
||||
border-color: var(--green);
|
||||
background: var(--nav-selected-bg);
|
||||
}
|
||||
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch:checked::before {
|
||||
transform: translateX(calc(var(--rp-switch-w) - var(--rp-switch-knob) - 6px));
|
||||
background: var(--green);
|
||||
}
|
||||
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch:focus-visible {
|
||||
outline: 2px solid var(--green);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
html:not([data-switch-controls="false"]) input[type=checkbox].switch:disabled {
|
||||
opacity: .5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.operation-message {
|
||||
margin: 14px 0 0;
|
||||
padding: 11px 12px;
|
||||
|
||||
Reference in new issue
Block a user