Open mtr1990 opened 2 weeks ago
The current default theme mixins.toolbar
also has this problem.
Variable generator seems misleading when working with @media
.
I think this case is like: https://github.com/mui/material-ui/issues/44212
@mtr1990 What's the reason behind the custom shouldSkipGeneratingVar
? It's not intended to be customized, at least we don't have a documentation of it yet.
@mtr1990 What's the reason behind the custom
shouldSkipGeneratingVar
? It's not intended to be customized, at least we don't have a documentation of it yet.
I only see typography variables created whenshouldSkipGeneratingVar
is used. So if not usingshouldSkipGeneratingVar
option how to access typography with theme.vars.typography
?
Because I also want to use these variables for .css
files not .js
like var(--typography-h1)
So css files do not accept syntax like theme.typography.h1
. I see the --font-h1
variable is created by default. But it doesn't apply to responsive.
The current CSS theme variables don't support responsive typography yet. Mark this issue as a new feature.
Steps to reproduce
When create theme with typography with h1 include responsive:
Current behavior
https://stackblitz.com/edit/github-emurbz?file=src%2Ftheme.ts,src%2Fapp%2Fpage.tsx,src%2Fcomponents%2FProTip.tsx,src%2Fcomponents%2FCopyright.tsx
Expected behavior
Generate variables that match media keys (300px, 400px...) and accept these values.
Context
No response
Your environment
No response
Search keywords: cssVariables typography responsive