diff --git a/.changeset/sad-shoes-help.md b/.changeset/sad-shoes-help.md new file mode 100644 index 00000000000..fb4923bb18a --- /dev/null +++ b/.changeset/sad-shoes-help.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Corrects bg color of disabled indeterminate checkbox diff --git a/packages/react/src/Checkbox/Checkbox.module.css b/packages/react/src/Checkbox/Checkbox.module.css index ef23cad0968..2be4bc11d95 100644 --- a/packages/react/src/Checkbox/Checkbox.module.css +++ b/packages/react/src/Checkbox/Checkbox.module.css @@ -33,21 +33,6 @@ &::before { animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms; } - } - - &:disabled { - cursor: not-allowed; - } - - &:checked { - transition: - background-color, - border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; - - &::before { - visibility: visible; - transition: visibility 0s linear 0s; - } &:disabled { background-color: var(--control-checked-bgColor-disabled); @@ -67,6 +52,21 @@ } } + &:disabled { + cursor: not-allowed; + } + + &:checked { + transition: + background-color, + border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; + + &::before { + visibility: visible; + transition: visibility 0s linear 0s; + } + } + &:indeterminate { background: var(--control-checked-bgColor-rest);