Check for code in palette before accessing background
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
This commit is contained in:
@@ -313,7 +313,6 @@ export const palettes: {
|
||||
tabbar: {
|
||||
indicator: string;
|
||||
};
|
||||
code: {};
|
||||
};
|
||||
dark: {
|
||||
type: 'dark';
|
||||
@@ -388,7 +387,6 @@ export const palettes: {
|
||||
tabbar: {
|
||||
indicator: string;
|
||||
};
|
||||
code: {};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ export const palettes = {
|
||||
tabbar: {
|
||||
indicator: '#9BF0E1',
|
||||
},
|
||||
code: {},
|
||||
},
|
||||
dark: {
|
||||
type: 'dark' as const,
|
||||
@@ -164,6 +163,5 @@ export const palettes = {
|
||||
tabbar: {
|
||||
indicator: '#9BF0E1',
|
||||
},
|
||||
code: {},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ export default ({ theme }: RuleOptions) => `
|
||||
/* CODE */
|
||||
--md-code-fg-color: ${theme.palette.text.primary};
|
||||
--md-code-bg-color: ${
|
||||
theme.palette.code.background || theme.palette.background.paper
|
||||
theme.palette.code?.background ?? theme.palette.background.paper
|
||||
};
|
||||
--md-code-hl-color: ${alpha(theme.palette.warning.main, 0.5)};
|
||||
--md-code-hl-color--light: var(--md-code-hl-color);
|
||||
|
||||
Reference in New Issue
Block a user