Replies: 2 comments 13 replies
-
|
I have a separate typography.css file that I import into a base layer. @import "./base/typography.css" layer(base);In that file, I just have typography related styles, for example: h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-heading);
line-height: var(--leading-tight);
}
h1 {
font-weight: var(--font-weight-extrabold);
font-size: var(--text-12xl);
}
...But the easiest way would be to have a base layer in your main css file like this: @layer base {
h1 {
@media (min-width: theme(--breakpoint-md)) {
font-size: 2.25em;
line-height: 1.2;
}
}
} |
Beta Was this translation helpful? Give feedback.
13 replies
-
|
this isn't supported directly in css right? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In V3 I configured typography in
tailwind.config.mjslike this:As you can see in the example, I changed the default font size and line height of the
<h1>element for themdbreakpoint.How to do the same in V4 (without using Legacy
tailwind.config.jsfile)?Beta Was this translation helpful? Give feedback.
All reactions