Replies: 1 comment 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In V3 I configured typography in
tailwind.config.mjs
like this:As you can see in the example, I changed the default font size and line height of the
<h1>
element for themd
breakpoint.How to do the same in V4 (without using Legacy
tailwind.config.js
file)?Beta Was this translation helpful? Give feedback.
All reactions