diff --git a/Dockerfile b/Dockerfile index 23a06eb..e9ef483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,10 @@ COPY package.json package-lock.json ./ RUN npm ci --no-audit --no-fund COPY vite.config.js ./ COPY static/src ./static/src +# Tailwind v4 scans these for utility-class usage at build time. They must be +# present or the generated CSS omits every utility class (broken layout, giant +# SVG icons). Paths mirror the @source directive in static/src/main.css. +COPY vergabe_teilnahme/templates ./vergabe_teilnahme/templates RUN npm run build # Output: /build/static/dist/main.css diff --git a/static/src/main.css b/static/src/main.css index b042e87..bc4d68e 100644 --- a/static/src/main.css +++ b/static/src/main.css @@ -1,5 +1,12 @@ @import "tailwindcss"; +/* Explicit content sources. Without these, Tailwind's automatic detection + depends on the build CWD finding the templates — which fails in the Docker + asset stage (it only copies static/src), producing a CSS with no utility + classes and badly oversized SVG icons. Keep these paths in sync with the + template dirs copied in the Dockerfile `assets` stage. */ +@source "../../vergabe_teilnahme/templates"; + @theme { --color-brand-50: #f0f4ff; --color-brand-100: #dce7ff;