Skip to content

Commit 4abf5e6

Browse files
authored
fix(Switch): don't show check when not checked in readonly (#2377)
resolves #2366
1 parent d87b070 commit 4abf5e6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/metal-bananas-notice.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@digdir/designsystemet-css": patch
3+
---
4+
5+
Switch: don't show check when not checked in readonly

packages/css/switch.css

+4
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@
212212
}
213213

214214
.ds-switch--readonly .ds-switch__input[readonly] + .ds-switch__label .ds-switch__track > .ds-switch__thumb {
215+
background-color: var(--ds-color-neutral-border-strong);
216+
}
217+
218+
.ds-switch--readonly .ds-switch__input[readonly]:checked + .ds-switch__label .ds-switch__track > .ds-switch__thumb {
215219
--dsc-switch-check_color: var(--ds-color-neutral-background-subtle);
216220

217221
background-color: var(--ds-color-neutral-border-strong);

0 commit comments

Comments
 (0)