START
Install
Two lines of CSS. No plugin to register and no config to extend; the package ships source and your bundler picks it up.
Nothing is published to a registry, so projects link it locally. Edits to the library are live in every linked project.
# register the library once, from its own checkout
cd ~/zed-projects/higreg-ds && npm link
# then in each project that wants it
npm link @pipejesus/higreg-ds// or pin the path, which survives a clean install
"dependencies": {
"@pipejesus/higreg-ds": "file:../higreg-ds"
}In your entry stylesheet, in this order. There is a note further down on what the first line is for.
@import "tailwindcss";
@import "@pipejesus/higreg-ds";That is the whole installation. This page does exactly those two lines.
Optional. portfolio-dark applies to :root by default, so a page with no data-theme still looks right. Name one when you want two themes on a page.
<html data-theme="portfolio-dark">
<body>
<a class="btn btn-primary">START A PROJECT</a>
</body>
</html>Two things, and neither of them is a component.
A reset β base.css never zeroes a margin or sets box-sizing, and every component assumes both. And the nine variables base.css reads: the page ground, the two families, the body size and the field corner.
That is the whole of it. Every component reads a --ds-* variable directly, so the component layer needs no build step at all.
Each role also generates a utility β bg-sunk, text-ink-faint, border-rule β and the variants you would expect work on them. This book is laid out with them. A page built from components alone needs none.
hover:btn does not work, and nothing warns you. Variants are built for utilities, and .btn is a plain class in a plain stylesheet. You get no CSS and no error.
You will not miss it. A component carries its own states already.
Every layer has a subpath of its own: primitives, components, sections, modules, themes. Useful if you want the tokens and none of the components, or a few components and not the rest.
/* tokens and base only β bring your own components */
@import "@pipejesus/higreg-ds/theme";
@import "@pipejesus/higreg-ds/themes/portfolio-dark";
@import "@pipejesus/higreg-ds/base";
/* or one component at a time */
@import "@pipejesus/higreg-ds/components/button";The library names two families β --ds-font-display for structure and --ds-font-body for reading β and loads neither. Use any two faces you like.
A site that loads nothing still renders correctly: the stacks fall back to ui-monospace and system-ui. See Theming for how to point them somewhere else.