fix: CSS layers were silently dropped by postcss-import

postcss-import requires ALL @import statements before any rules.
The :root {} override block between Open Props import and layer
imports caused all 11 layer files to be silently dropped — only
Open Props variables made it through (29KB of definitions, zero
actual styles).

Fix: move :root overrides after all imports. Add explicit PostCSS
build step to deploy.sh (Hugo Pipes runs from a temp dir that
breaks relative paths anyway).

Result: 102KB compiled CSS = Open Props + all ASW layers.
This commit is contained in:
Vigilio Desto 2026-04-10 17:53:17 +02:00
parent f8821c226d
commit 8a9cfc22bb
Signed by: vigilio
GPG key ID: 159D6AD58C8E55E9
3 changed files with 12 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,17 +1,15 @@
/* ASW Agentic Semantic Web Framework /* ASW Agentic Semantic Web Framework
* Entry point: Open Props foundation + ASW layer stack * Entry point: Open Props foundation + ASW layer stack
* PostCSS-import resolves all @imports at build time * PostCSS-import resolves all @imports at build time
*
* NOTE: ALL @import statements must come first.
* postcss-import drops any @import that follows a rule.
*/ */
/* 1. Full Open Props token foundation */ /* 1. Open Props token foundation */
@import "open-props/open-props.min.css"; @import "open-props/open-props.min.css";
/* 2. ASW theme overrides — edit here to retheme */ /* 2. Framework layers */
:root {
/* Override Open Props primitives or ASW semantics here */
}
/* 3. Framework layers — stable, do not edit */
@import "./layers/00-reset.css"; @import "./layers/00-reset.css";
@import "./layers/01-tokens.css"; @import "./layers/01-tokens.css";
@import "./layers/02-semantic.css"; @import "./layers/02-semantic.css";
@ -23,3 +21,8 @@
@import "./layers/08-layout.css"; @import "./layers/08-layout.css";
@import "./layers/08a-paper.css"; @import "./layers/08a-paper.css";
@import "./layers/09-landing.css"; @import "./layers/09-landing.css";
/* 3. ASW theme overrides — edit here to retheme */
:root {
/* Override Open Props primitives or ASW semantics here */
}

View file

@ -4,5 +4,6 @@ set -euo pipefail
cd ~/projects/asw cd ~/projects/asw
git pull origin main --ff-only git pull origin main --ff-only
npm ci --prefer-offline 2>/dev/null npm ci --prefer-offline 2>/dev/null
npx postcss assets/css/asw.css -o assets/css/asw-built.css
hugo hugo
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] Deploy complete" >> /tmp/asw-deploy.log echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] Deploy complete" >> /tmp/asw-deploy.log