Skip to content

Commit 6659763

Browse files
committed
updated generation of extra CSS files to include hds-theme-default selector for default (non-themed) HDS styling
1 parent 7197aab commit 6659763

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/tokens/scripts/build-parts/generateExtraThemingFiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function generateExtraThemingFiles(_dictionary: Dictionary, config:
4343
outputContent = `${header}\n\n`;
4444
//
4545
// this is the fallback to the default `hds` mode
46-
outputContent += `${hdsThemedSource}\n\n`;
46+
outputContent += `${hdsThemedSource.replace(/^:root/, '.hds-theme-default, :root')}\n\n`;
4747
//
4848
// these are the themed `carbonized` tokens
4949
outputContent += `${cds0ThemedSource.replace(/^:root/, '.hds-theme-light, .hds-theme-cds-g0, [data-hds-theme="light"], [data-hds-theme="cds-g0"]')}\n\n`;
@@ -60,7 +60,7 @@ export async function generateExtraThemingFiles(_dictionary: Dictionary, config:
6060
outputContent = `${header}\n\n`;
6161
//
6262
// this is the fallback to the default `hds` mode
63-
outputContent += `${hdsThemedSource}\n\n`;
63+
outputContent += `${hdsThemedSource.replace(/^:root/, '.hds-theme-default, :root')}\n\n`;
6464
//
6565
// these are the themed `carbonized` tokens
6666
// note: we will revisit the `[class*=hds-theme-]` selector if we find that is too generic and there are cases where this is picking up other classes

0 commit comments

Comments
 (0)