I'm looking to add some specific print styling and I'm struggling to find any documentation on how I would do that using MUI's themeing system.
declare module '@mui/material/styles' {
interface Theme {
"@media print": ThemeOptions,
}
// allow configuration using `createTheme`
interface ThemeOptions {
"@media print"?: ThemeOptions;
}
}
const theme = createTheme({
typography: {
h2: {
fontSize: '2rem',
fontWeight: 700,
borderBottom: '2px solid black',
},
},
'@media print': {
typography: {
h2: {
fontSize: '8rem',
borderBottom: '20px solid red',
color: blue[100],
}
}
},
});
In the example above I can see the changes I've made to the h2 normally but when I go to print I'm not seeing the print styles applied.