From 6a0fb64a4dbe811848c81cce6172faa02eb73770 Mon Sep 17 00:00:00 2001 From: Shewatipa Tseisi Date: Fri, 9 Oct 2026 21:20:11 +0200 Subject: [PATCH] fix: stop shellui-theme.css requesting tailwindcss when linked directly The theme started with @import "tailwindcss";, so a page that links it asked the browser for a tailwindcss URL and logged a 404 on every load. The CSS build script now writes the import into its generated input, so the theme file holds only the theme and shellui-all.css is unchanged. --- scripts/rebuild-precompiled-css.sh | 6 ++++-- src/ShellUI.Components/wwwroot/shellui-theme.css | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) 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);