From 3a3a36e2eaf21581e7d28efde88fe84aa6dd7071 Mon Sep 17 00:00:00 2001 From: Kenzo Date: Wed, 23 Jul 2025 21:57:33 +0200 Subject: [PATCH] Update CSS imports and Dockerfile for consistent styles handling - Enforced `!important` for `--color-background` in `variables.css`. - Centralized CSS imports in `Layout.astro` for cleaner markup. - Adjusted Dockerfile to ensure CSS variables are copied to `public/styles`. - Refined fallback handling in `index.css` for `background-color`. --- .idea/Gallus_Pub.iml | 1 - Dockerfile | 3 +++ src/components/Layout.astro | 4 ++-- styles/index.css | 3 ++- styles/variables.css | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.idea/Gallus_Pub.iml b/.idea/Gallus_Pub.iml index 9f7ba11..24643cc 100644 --- a/.idea/Gallus_Pub.iml +++ b/.idea/Gallus_Pub.iml @@ -8,6 +8,5 @@ - \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9056d4e..5e532af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . +# Ensure CSS variables are present +RUN mkdir -p public/styles +RUN cp -r styles/* public/styles/ || true RUN npm run build FROM node:20-alpine AS production diff --git a/src/components/Layout.astro b/src/components/Layout.astro index 574ba22..d7c95dd 100644 --- a/src/components/Layout.astro +++ b/src/components/Layout.astro @@ -3,6 +3,8 @@ import Header from "./Header.astro"; import Footer from "./Footer.astro"; import "../../styles/components/Layout.css" +import "../../styles/variables.css" +import "../../styles/index.css" --- @@ -14,8 +16,6 @@ import "../../styles/components/Layout.css" Gallus Pub - - diff --git a/styles/index.css b/styles/index.css index 1a5e731..85c14eb 100644 --- a/styles/index.css +++ b/styles/index.css @@ -12,7 +12,8 @@ html { body { font-family: var(--font-family-primary), serif; - background-color: var(--color-background); + background-color: var(--color-background, #000000); + background: #000000; color: var(--color-text); line-height: var(--line-height); } diff --git a/styles/variables.css b/styles/variables.css index 1d34f72..9b1b55c 100644 --- a/styles/variables.css +++ b/styles/variables.css @@ -1,6 +1,6 @@ :root { /* Colors */ - --color-background: #000; + --color-background: #000000 !important; --color-text: #f5f5f5; --color-accent-green: #213b28; --color-accent-beige: #ceb39b;