[cssVariables] Creating variables for typography with responsive incorrectly and not work
Open
@siriwatknp is already working on this.
Since Nov 4, 2024.
customization: theme
scope: typography
type: new feature
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
When create theme with typography with h1 include responsive:
const theme = createTheme({
...
typography: {
fontFamily: roboto.style.fontFamily,
h1: {
fontSize: '2.8rem',
color: 'red',
fontWeight: 'bold',
'@media (min-width:300px)': {
fontSize: '3rem',
},
'@media (min-width:400px)': {
fontSize: '4rem',
},
},
...
},
...
},
});
Current behavior
This variable appears to be non-existent or malformed
// output:
'@media (min-width:400px)': {
fontSize: var(--typography-h1-@media (min-width:400px)-fontSize)
},
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.