Replies: 1 comment 1 reply
-
Hey! Our goal with Tailwind CSS v4 is to keep things simple. If you want to customize your theme values then you can, but if you want to rely on default values that existed before, then you currently have to copy & paste them. It's a tiny bit more work, but luckily you typically only have to do that once. We could make it work with some fancy syntax, but that would only introduce new syntax that you'd have to learn. Something that comes to mind: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In v3 it was really easy to extend default
font-family
configuration by prependingsans
:In v4 there doesn't seem to be a way to reference that default font stack anymore via CSS-first configuration.
If I use the following definition
—font-sans: "Inter";
it will negate default font stack causing browser to fallback toserif
font while custom font is loading (font-display: swap
is applied). So I need to somehow to reference default font stack in--font-sans
variable.Current workaround seems to be to copy default stack and declare
But this feels really unnecessary.
Is there a more elegant solution to this problem? Or maybe tailwindcss v4 could declare css variable with default font stack for others to reference?
Beta Was this translation helpful? Give feedback.
All reactions