feat(webui): vendor Tailwind via go:embed (#1601)#1604
Merged
Conversation
Replace runtime cdn.tailwindcss.com script in templates/work/{board,detail}.html
with a build-time-compiled, embedded /static/tailwind.css. The compiled file is
committed so plain go build still works without Node or the Tailwind CLI.
- internal/webui/tailwind.{input.css,config.js}: Tailwind v3 source + content
glob over internal/webui/templates
- internal/webui/static/tailwind.css: minified output, embedded via existing
//go:embed static/* directive
- Makefile: tailwind target downloads pinned v3.4.17 standalone binary into
tools/ (gitignored); tailwind-check regenerates + git diff --exit-code for
CI drift detection
- internal/webui/tailwind_test.go: asserts CSS embedded, non-empty, contains
--tw- custom props + bg-slate-50 utility; guards templates against CDN
regression
- docs/build.md: front-end build steps + npx fallback path
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cdn.tailwindcss.comscript with build-time-compiled, embedded/static/tailwind.csstailwind.input.css,tailwind.config.js) with content glob overinternal/webui/templatesinternal/webui/static/tailwind.cssso plaingo buildworks without Node or Tailwind CLItailwindtarget downloads pinned v3.4.17 standalone binary intotools/;tailwind-checkregenerates +git diff --exit-codefor CI drift detectionRelated to #1601
Changes
internal/webui/tailwind.input.css,internal/webui/tailwind.config.js— Tailwind v3 source + configinternal/webui/static/tailwind.css— minified output, embedded via existing//go:embed static/*internal/webui/templates/work/{board,detail}.html— drop CDN<script>, use embedded stylesheetinternal/webui/tailwind_test.go— embed assertions + CDN regression guardMakefile—tailwindandtailwind-checktargetsdocs/build.md— front-end build docs incl. npx fallback.gitignore— ignoretools/directoryTest Plan
go test ./internal/webui/...— embed + regression guards passmake tailwind-check— regenerated output matches committed CSSgo build ./... && wave webui— board/detail render with Tailwind utilities, no network requests to cdn.tailwindcss.com