Skip to content

Fix Tailwind not generating any utilities - #101

Merged
spydon merged 1 commit into
mainfrom
fix-tailwind-sources
Oct 22, 2026
Merged

spydon merged 1 commit into
mainfrom
fix-tailwind-sources

Conversation

@spydon

@spydon spydon commented Oct 22, 2026

Copy link
Copy Markdown
Member

After the Tailwind CSS 4 migration in #98, the deployed main.css only contains the theme and preflight, with no utility classes, so the whole layout of https://flame-engine.org is broken.

Cause

jekyll-postcss runs PostCSS with from: undefined. Without a file path, @tailwindcss/postcss resolves @source paths relative to its base option, which defaults to the current working directory (the repository root). The @source "../../_includes/**/*.html" style paths were written relative to assets/css/, so they pointed outside of the repository and nothing was scanned.

Fix

  • The @source paths in assets/css/main.css are now relative to the repository root.
  • postcss.config.js passes base: __dirname, so the result does not depend on the working directory.
  • The build workflow now checks that the generated CSS contains utilities, since the broken build passed CI.

Compiled the same way jekyll-postcss does it, the CSS goes from 7.5 KB (identical to the deployed file) back to 17 KB, and the generated classes match the Tailwind CSS 3 output from before #98, plus the dino game classes.

@spydon
spydon merged commit 697c438 into main Oct 22, 2026
1 check passed
@spydon
spydon deleted the fix-tailwind-sources branch October 22, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant