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`.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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"
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
@ -14,8 +16,6 @@ import "../../styles/components/Layout.css"
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Gallus Pub</title>
|
||||
<link rel="stylesheet" href="/styles/variables.css" />
|
||||
<link rel="stylesheet" href="/styles/index.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
:root {
|
||||
/* Colors */
|
||||
--color-background: #000;
|
||||
--color-background: #000000 !important;
|
||||
--color-text: #f5f5f5;
|
||||
--color-accent-green: #213b28;
|
||||
--color-accent-beige: #ceb39b;
|
||||
|
||||
Reference in New Issue
Block a user