Skip to content

Commit

Permalink
fix(Switch): don't show check when not checked in readonly (#2377)
Browse files Browse the repository at this point in the history
resolves #2366
  • Loading branch information
Barsnes authored Sep 6, 2024
1 parent d87b070 commit 4abf5e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-bananas-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Switch: don't show check when not checked in readonly
4 changes: 4 additions & 0 deletions packages/css/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@
}

.ds-switch--readonly .ds-switch__input[readonly] + .ds-switch__label .ds-switch__track > .ds-switch__thumb {
background-color: var(--ds-color-neutral-border-strong);
}

.ds-switch--readonly .ds-switch__input[readonly]:checked + .ds-switch__label .ds-switch__track > .ds-switch__thumb {
--dsc-switch-check_color: var(--ds-color-neutral-background-subtle);

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

0 comments on commit 4abf5e6

Please sign in to comment.