Fix default outlined toggle selected state

This commit is contained in:
Ilia Ross
2026-09-10 01:42:48 +02:00
parent 11d942a43b
commit a29cd271fc
4 changed files with 4 additions and 11 deletions

View File

@@ -34,7 +34,7 @@ to secondary (gray); primary uses the blue/accent color. Colors follow the
theme with built-in fallbacks.
Add `outline => 1` for a transparent track with a colored border and thumb.
Secondary uses an outline when off and a soft gray fill when on. The Forms
The track stays unfilled in both positions, including secondary. The Forms
tab shows both positions for every outline color.
Toggles are compact with softened corners by default. Pass `round => 1` for

View File

@@ -110,7 +110,7 @@ index_f_toggle_colors_desc=Checked switches default to secondary. Use primary fo
index_f_toggle_primary=Primary
index_f_toggle_secondary=Secondary (default)
index_f_toggle_outline=Outline toggles
index_f_toggle_outline_desc=Outline tracks use the state color when on. Secondary keeps a soft fill. Click the switches to compare their off and on states.
index_f_toggle_outline_desc=Outline tracks stay unfilled and use the state color for the border and thumb when on. Click the switches to compare their off and on states.
index_f_toggle_off=Off
index_f_toggle_on=On
index_f_toggle_round=Rounded toggles

View File

@@ -5393,8 +5393,8 @@ are :
info or neutral (the default). C<error> aliases danger; secondary, gray and grey
alias neutral. Use primary for the theme's blue/accent toggle color.
=item outline - Set to 1 for a bordered track with a matching thumb. Secondary
uses the unchecked track color as a soft fill when on.
=item outline - Set to 1 for a transparent track with a matching border and
thumb, using the state color when on.
=item round - Set to 1 for a fully rounded track and thumb. The default is
smaller with softened corners. Works with filled and outline styles.

View File

@@ -1002,13 +1002,6 @@ a.ui_list_link:hover { color: var(--ui-accent) !important; }
color: var(--ui-toggle-bg-checked);
background: transparent;
}
/* Secondary stays quiet when on, using the normal off-state fill. */
.ui_toggle_outline.ui_toggle_neutral input:checked ~ .ui_toggle_track,
.ui_toggle_outline.ui_toggle_neutral:has(input:checked) .ui_toggle_track {
color: var(--ui-toggle-thumb);
border-color: var(--ui-toggle-bg);
background: var(--ui-toggle-bg);
}
.ui_toggle input:focus-visible ~ .ui_toggle_track,
.ui_toggle:has(input:focus-visible) .ui_toggle_track {
box-shadow: 0 0 0 3px var(--ui-ring);