From a42766e2f751174c5758e01c165838efb11e1f0b Mon Sep 17 00:00:00 2001 From: David Josefson Date: Wed, 15 Apr 2026 09:39:02 +0200 Subject: [PATCH] fix(ui): use correct dark theme selector in Dialog (#33898) * fix(ui): use correct dark theme selector in Dialog The Dialog component used [data-theme='dark'] while every other BUI component and the global token system uses [data-theme-mode='dark']. This mismatch meant the dark mode background rule never matched. Signed-off-by: David Josefson * Update .changeset/fix-dialog-dark-theme-selector.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: David Josefson --------- Signed-off-by: David Josefson Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .changeset/fix-dialog-dark-theme-selector.md | 7 +++++++ packages/ui/src/components/Dialog/Dialog.module.css | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-dialog-dark-theme-selector.md diff --git a/.changeset/fix-dialog-dark-theme-selector.md b/.changeset/fix-dialog-dark-theme-selector.md new file mode 100644 index 0000000000..287278d3a5 --- /dev/null +++ b/.changeset/fix-dialog-dark-theme-selector.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Fixed dark mode background for Dialog component by correcting the theme attribute selector from `data-theme` to `data-theme-mode`. + +**Affected components:** Dialog diff --git a/packages/ui/src/components/Dialog/Dialog.module.css b/packages/ui/src/components/Dialog/Dialog.module.css index b6d26b3f3d..b6d98446e5 100644 --- a/packages/ui/src/components/Dialog/Dialog.module.css +++ b/packages/ui/src/components/Dialog/Dialog.module.css @@ -30,7 +30,7 @@ z-index: 1000; } - [data-theme='dark'] .bui-Dialog { + [data-theme-mode='dark'] .bui-Dialog { background: rgba(0, 0, 0, 0.5); }