dcss is a small shared CSS layer for static HTML documents.
Use it when several repos should share the same visual system but keep their own content, page structure, and small local overrides.
dcss is short for document CSS: lowercase, easy to type, and specific to the repository’s purpose.
src/ source CSS
v1/ stable version served by GitHub Pages
latest/ moving version served by GitHub Pages
examples/ local preview HTML
Makefile build, clean, and preview commands
The public URLs are intended to look like this after enabling GitHub Pages from the repository root:
<link rel="stylesheet" href="https://njlane314.github.io/dcss/v1/style.css">
or, for automatic updates:
<link rel="stylesheet" href="https://njlane314.github.io/dcss/latest/style.css">
Use v1 for controlled stability. Use latest only when both consuming sites should update immediately after each push to this repo.
In grid or nobody, replace duplicated style blocks with:
<head>
<link rel="stylesheet" href="https://njlane314.github.io/dcss/v1/style.css">
<link rel="stylesheet" href="./local.css">
</head>
Then keep project-specific overrides in local.css:
:root {
--ds-accent: #22c55e;
}
Load local CSS after dcss so overrides win by normal cascade order.
Shared CSS should contain:
.page, .card, .button, .badge, .callout, .grid.muted, .center, .measure, spacing helpersShared CSS should not contain page-specific selectors from grid or nobody.
Prefer this:
.card {
padding: var(--ds-space-6);
}
Avoid this:
#nobody-intro .card {
padding: 3rem;
}
No Node, bundler, or package manager is required.
make build
This copies src/*.css into both v1/ and latest/.
Preview locally:
make preview
Then open:
http://localhost:8000/examples/
From inside this directory:
git init
git add .
git commit -m "initial import"
Create a GitHub repo named dcss, push it, then enable GitHub Pages with:
Settings → Pages → Build and deployment → Deploy from a branch → main / root
After Pages is active, use:
<link rel="stylesheet" href="https://njlane314.github.io/dcss/v1/style.css">
v1/ should only receive changes that preserve existing class names and token names.
Safe changes:
Breaking changes should go into a new directory such as v2/.
latest/ may track the newest version and can break consumers that opt into it.
For grid:
:root {
--ds-accent: #16a34a;
}
For nobody:
:root {
--ds-accent: #ef4444;
}
For a compact page:
:root {
--ds-page: 56rem;
}