Skip to content

Instantly share code, notes, and snippets.

@yaikohi
Created April 5, 2024 07:32
Show Gist options
  • Save yaikohi/e8af3dfc26a9947eb3539ce62eeaae5c to your computer and use it in GitHub Desktop.
Save yaikohi/e8af3dfc26a9947eb3539ce62eeaae5c to your computer and use it in GitHub Desktop.
typographic styles (from shadcn) for standard styling of text-focussed html elements in tailwind
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
font-feature-settings:
"rlig" 1,
"calt" 1;
}
h1 {
@apply text-4xl font-extrabold tracking-tight lg:text-5xl;
}
h2 {
@apply border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0;
}
h3 {
@apply text-2xl font-semibold tracking-tight;
}
h4 {
@apply text-xl font-semibold tracking-tight;
}
p {
@apply leading-7;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment