diff --git a/.changeset/metal-bananas-notice.md b/.changeset/metal-bananas-notice.md new file mode 100644 index 0000000000..933209fd0b --- /dev/null +++ b/.changeset/metal-bananas-notice.md @@ -0,0 +1,5 @@ +--- +"@digdir/designsystemet-css": patch +--- + +Switch: don't show check when not checked in readonly diff --git a/packages/css/switch.css b/packages/css/switch.css index 14ffca487c..117d0be2c2 100644 --- a/packages/css/switch.css +++ b/packages/css/switch.css @@ -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);