Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions docs/data/material/customization/typography/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,21 @@ The `theme.typography.*` [variant](#variants) properties map directly to the gen
You can use [media queries](/material-ui/customization/breakpoints/#api) inside them:

```js
const theme = createTheme();
const baseTheme = createTheme();

theme.typography.h3 = {
fontSize: '1.2rem',
'@media (min-width:600px)': {
fontSize: '1.5rem',
},
[theme.breakpoints.up('md')]: {
fontSize: '2.4rem',
const theme = createTheme({
typography: {
h3: {
fontSize: '1.2rem',
'@media (min-width:600px)': {
fontSize: '1.5rem',
},
[baseTheme.breakpoints.up('md')]: {
fontSize: '2.4rem',
},
},
},
};
});
```

{{"demo": "CustomResponsiveFontSizes.js"}}
Expand Down
Loading