Skip to content

Commit ed28da8

Browse files
dylanatsmithCopilot
andcommitted
Use logical inset properties for ToggleSwitch knob positioning
Replace the four-value inset shorthand with inset-block and inset-inline-start, dropping the auto filler for the inline-end edge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 82558dc commit ed28da8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/components/primer/alpha/toggle_switch.pcss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@
158158

159159
.ToggleSwitch-knob {
160160
position: absolute;
161-
/* top / bottom / left clear the track border; right stays auto (width drives it) */
162-
inset: var(--toggleSwitch-knob-inset) auto var(--toggleSwitch-knob-inset) var(--toggleSwitch-knob-inset);
161+
/* clear the track border on the block edges + inline-start; inline-end stays auto (width drives it) */
162+
inset-block: var(--toggleSwitch-knob-inset);
163+
inset-inline-start: var(--toggleSwitch-knob-inset);
163164
z-index: 1;
164165
width: 50%;
165166
background-color: var(--controlKnob-bgColor-rest);

0 commit comments

Comments
 (0)