diff --git a/scripts/rebuild-precompiled-css.sh b/scripts/rebuild-precompiled-css.sh index 4d8a6c6..86ee88a 100755 --- a/scripts/rebuild-precompiled-css.sh +++ b/scripts/rebuild-precompiled-css.sh @@ -38,10 +38,12 @@ mv "$INPUT_CSS" "$INPUT_CSS.css" INPUT_CSS="$INPUT_CSS.css" COMPONENTS_ROOT="src/ShellUI.Components" -# @source inline, because Tailwind's file extractor misses `[state=…]` classes in plain text. -cat "$COMPONENTS_ROOT/wwwroot/shellui-theme.css" > "$INPUT_CSS" +# The import lives here, not in shellui-theme.css, so the theme can be linked directly without a 404. +printf '@import "tailwindcss";\n\n' > "$INPUT_CSS" +cat "$COMPONENTS_ROOT/wwwroot/shellui-theme.css" >> "$INPUT_CSS" echo "" >> "$INPUT_CSS" +# @source inline, because Tailwind's file extractor misses `[state=…]` classes in plain text. # Chunks of ~500 chars to avoid very long strings. awk ' BEGIN { line=""; } diff --git a/src/ShellUI.Components/wwwroot/shellui-theme.css b/src/ShellUI.Components/wwwroot/shellui-theme.css index a2c81f9..39a8a34 100644 --- a/src/ShellUI.Components/wwwroot/shellui-theme.css +++ b/src/ShellUI.Components/wwwroot/shellui-theme.css @@ -1,5 +1,3 @@ -@import "tailwindcss"; - :root { --background: oklch(0.9900 0 0); --foreground: oklch(0 0 0);