From 5f155118db25a3d3bb3858172ca541431d59d1f2 Mon Sep 17 00:00:00 2001 From: kkachniarz220 <50884231+kkachniarz220@users.noreply.github.com> Date: Fri, 31 Mar 2023 09:07:42 +0200 Subject: [PATCH 1/2] Remove unwanted additional paletteKey property from color token with paletteTones --- typescript/utils/theme_utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/utils/theme_utils.ts b/typescript/utils/theme_utils.ts index 51421d2c..743688bf 100644 --- a/typescript/utils/theme_utils.ts +++ b/typescript/utils/theme_utils.ts @@ -170,7 +170,7 @@ export function applyTheme(theme: Theme, options?: { for (const [key, palette] of Object.entries(theme.palettes)) { const paletteKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); for (const tone of tones) { - const token = `--md-ref-palette-${paletteKey}-${paletteKey}${tone}`; + const token = `--md-ref-palette-${paletteKey}${tone}`; const color = hexFromArgb(palette.tone(tone)); target.style.setProperty(token, color); } @@ -188,4 +188,4 @@ function setSchemeProperties( const color = hexFromArgb(value); target.style.setProperty(`--md-sys-color-${token}${suffix}`, color); } -} \ No newline at end of file +} From c67963e04a3b200a8702ee1400305388be5172df Mon Sep 17 00:00:00 2001 From: kkachniarz Date: Fri, 31 Mar 2023 10:16:51 +0200 Subject: [PATCH 2/2] Undo changes with new line at the end of file