Skip to content

Selected checkbox in a disabled checkbox group has the wrong fill color #5378

@LFDanLu

Description

@LFDanLu

Provide a general summary of the issue here

The fill color for a selected checkbox in a disabled checkbox group has the wrong fill color, see below.

🤔 Expected Behavior?

image

😯 Current Behavior

Current:
image

💁 Possible Solution

The css for

.spectrum-Checkbox-input,
.spectrum-Checkbox-input:checked {
&:disabled + .spectrum-Checkbox-box,
&:disabled:active + .spectrum-Checkbox-box {
&:before {
border-color: var(--spectrum-checkbox-emphasized-box-border-color-disabled);
background-color: var(--spectrum-checkbox-emphasized-box-background-color-disabled);
}
}
should win over
&.spectrum-Checkbox--quiet {
.spectrum-Checkbox-input:checked + .spectrum-Checkbox-box,
&.is-indeterminate .spectrum-Checkbox-box,
&.is-indeterminate .spectrum-Checkbox-input:focus-visible + .spectrum-Checkbox-box {
&:before {
border-color: var(--spectrum-checkbox-quiet-box-border-color-selected);
}
}

🔦 Context

No response

🖥️ Steps to Reproduce

See https://reactspectrum.blob.core.windows.net/reactspectrum/6c61f5b1db5f52ebc654bf754a15594bb0662f6f/storybook/index.html?path=/story/checkboxgroup--controlled-value&args=isDisabled:true&providerSwitcher-express=false

Version

3.31

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

MacOS 14.1

🧢 Your Company/Team

Adobe Admin Experience

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions