Menu

Our Tailwind config is a v3 file that v4 reads through one @config line, and I measured which of its 80 lines reach the browser
📰

Our Tailwind config is a v3 file that v4 reads through one @config line, and I measured which of its 80 lines reach the browser

DEV Community: css·Daniel Pertu·1 day ago
#Y2qEXjLv
#devtocss#devto#dev#border#container
Reading 0:00
15s threshold

Our stylesheet starts like this:

@import "tailwindcss" ; @config "../tailwind.config.ts" ;

Enter fullscreen mode

Exit fullscreen mode

Line one is Tailwind v4. Line two reaches back and loads an 80-line v3-shaped JavaScript config: content globs, a prefix , darkMode , a theme.extend , two keyframes and a require() d plugin. It works, because @config exists precisely so that a project can move to v4 without rewriting its theme the same afternoon. The question I had not asked is which parts of that file still decide anything.

The useful thing about this question is that it is answerable from outside.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.