diff --git a/packages/pl-fe/src/init/pl-fe-head.tsx b/packages/pl-fe/src/init/pl-fe-head.tsx index 1c710e003..a3c4f5798 100644 --- a/packages/pl-fe/src/init/pl-fe-head.tsx +++ b/packages/pl-fe/src/init/pl-fe-head.tsx @@ -46,10 +46,10 @@ const PlFeHead = () => { 'dark': theme === 'dark', 'dark black': theme === 'black', })} + // @ts-ignore + style={themeCss + ['dark', 'black'].includes(theme) ? 'color-scheme: dark;' : ''} /> - {themeCss && } - {['dark', 'black'].includes(theme) && } ); diff --git a/packages/pl-fe/src/utils/theme.ts b/packages/pl-fe/src/utils/theme.ts index 62210833e..0b810e5e3 100644 --- a/packages/pl-fe/src/utils/theme.ts +++ b/packages/pl-fe/src/utils/theme.ts @@ -76,7 +76,7 @@ const generateNeutral = (brandColor: string): string | null => { return hslToHex({ h, s: 20, l: 55 }); }; -const parseShades = (obj: Record, color: string, shades: Record): void => { +const parseShades = (obj: Record, color: string, shades: Record): void => { if (!shades) return; if (typeof shades === 'string') { @@ -98,7 +98,7 @@ const parseShades = (obj: Record, color: string, shades: Record +const parseColors = (colors: TailwindColorPalette): Record => Object.keys(colors).reduce((obj, color) => { parseShades(obj, color, colors[color] as TailwindColorObject); return obj;