diff --git a/.changeset/bumpy-planets-go.md b/.changeset/bumpy-planets-go.md new file mode 100644 index 0000000000..5477711c1a --- /dev/null +++ b/.changeset/bumpy-planets-go.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Fixed Checkbox indicator showing checkmark color when unchecked. + +Affected components: Checkbox diff --git a/packages/ui/src/components/Checkbox/Checkbox.module.css b/packages/ui/src/components/Checkbox/Checkbox.module.css index bc4f700bce..23a88d2b80 100644 --- a/packages/ui/src/components/Checkbox/Checkbox.module.css +++ b/packages/ui/src/components/Checkbox/Checkbox.module.css @@ -48,7 +48,23 @@ background-color: var(--bui-bg-surface-1); padding: 0; flex-shrink: 0; - color: var(--bui-fg-solid); + color: transparent; + + .bui-Checkbox[data-focus-visible] & { + transition: none; + outline: 2px solid var(--bui-ring); + outline-offset: 2px; + } + + .bui-Checkbox[data-selected] & { + background-color: var(--bui-bg-solid); + box-shadow: none; + color: var(--bui-fg-solid); + } + + .bui-Checkbox[data-hovered]:not([data-selected]) & { + box-shadow: inset 0 0 0 1px var(--bui-border-hover); + } @media (prefers-reduced-motion: reduce) { & { @@ -56,19 +72,4 @@ } } } - - .bui-Checkbox[data-focus-visible] .bui-CheckboxIndicator { - transition: none; - outline: 2px solid var(--bui-ring); - outline-offset: 2px; - } - - .bui-Checkbox[data-selected] .bui-CheckboxIndicator { - background-color: var(--bui-bg-solid); - box-shadow: none; - } - - .bui-Checkbox[data-hovered]:not([data-selected]) .bui-CheckboxIndicator { - box-shadow: inset 0 0 0 1px var(--bui-border-hover); - } }