diff --git a/.changeset/rich-crews-wonder.md b/.changeset/rich-crews-wonder.md new file mode 100644 index 000000000..67aaf1cb8 --- /dev/null +++ b/.changeset/rich-crews-wonder.md @@ -0,0 +1,5 @@ +--- +'@primer/primitives': patch +--- + +Add ::backdrop to css diff --git a/src/platforms/css.ts b/src/platforms/css.ts index b58005ea4..652abfc40 100644 --- a/src/platforms/css.ts +++ b/src/platforms/css.ts @@ -10,9 +10,9 @@ const getCssSelectors = (outputFile: string): {selector: string; selectorLight: const mode = outputBasename.substring(0, 4) === 'dark' ? 'dark' : 'light' return { - selector: `[data-color-mode="${mode}"][data-${mode}-theme="${themeName}"]`, - selectorLight: `[data-color-mode="auto"][data-light-theme="${themeName}"]`, - selectorDark: `[data-color-mode="auto"][data-dark-theme="${themeName}"]`, + selector: `[data-color-mode="${mode}"][data-${mode}-theme="${themeName}"], [data-color-mode="${mode}"][data-${mode}-theme="${themeName}"] ::backdrop`, + selectorLight: `[data-color-mode="auto"][data-light-theme="${themeName}"], [data-color-mode="auto"][data-light-theme="${themeName}"] ::backdrop`, + selectorDark: `[data-color-mode="auto"][data-dark-theme="${themeName}"], [data-color-mode="auto"][data-dark-theme="${themeName}"] ::backdrop`, } }