Overview
PimentCSS ships as one compiled stylesheet plus optional Sass entry points. Pick a path below, load CSS once, and use component classes (for example .btn, .field). No runtime JavaScript is required for styling.
| Path | Best for | Output |
|---|---|---|
| npm / pnpm / yarn | Vite, webpack, Parcel, Node apps | node_modules/pimentcss-design-system/dist/pimentcss.min.css |
| CDN | Prototypes, static HTML, CodePen | Hosted pimentcss.min.css |
| Sass theme | Brand tokens, partial imports | Your compiled theme.css |
Prerequisites
- Package manager (npm, pnpm, or yarn) for the npm path only.
- Sass ^1.69 (optional) when you compile a custom theme.
- Fonts (recommended): Zodiak Bold + Plus Jakarta Sans in
fonts/, thennpm run build:fontsbeforebuild:cssin this repo. Seefonts/README.md. Without files, CDN fallbacks apply. - Modern browsers with OKLCH and
color-schemesupport. Details on Accessibility.
Quick start (npm)
Fastest path for most projects: install the package, import CSS once, add a button to verify.
-
Install
Addpimentcss-design-systemto your project. Thestyleexport points atdist/pimentcss.min.css.npm install pimentcss-design-system -
Import CSS
Import once at application startup (bundler entry or global CSS).import "pimentcss-design-system"; -
Verify
Add a primary button. In DevTools → Computed, check--surface-actionon the button and tab to see the focus ring.<button type="button" class="btn btn--primary">It works</button>
Install with npm, pnpm, or yarn
Install the published package, then import the minified CSS in your bundler entry.
Install the package
npm install pimentcss-design-system
pnpm add pimentcss-design-system
yarn add pimentcss-design-system
Import in your bundler
Use the package root or the explicit file path.
import "pimentcss-design-system";
// or
import "pimentcss-design-system/dist/pimentcss.min.css";
CDN (no build step)
For static pages or quick experiments, load the minified file from a public CDN. Pin an exact version in production.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pimentcss-design-system@1/dist/pimentcss.min.css">
Replace @1 with a fixed semver (for example @1.0.1) so upgrades stay predictable.
Static HTML (local file)
After npm install, link the file from node_modules or copy dist/pimentcss.min.css into your assets folder.
<link rel="stylesheet" href="node_modules/pimentcss-design-system/dist/pimentcss.min.css">
Sass theme (optional)
Override !default variables, then compile your own CSS. See Customization for partial imports and the OKLCH token pipeline.
// my-theme.scss
@use "pimentcss-design-system" with (
$font-family-heading: "Inter", system-ui, sans-serif,
$btn-min-height: 2.75rem,
$surface-action: #0f766e,
);
// npx sass my-theme.scss dist/my-theme.css
Peer dependency
Sass ^1.69 is optional. Install it only when you compile a theme: npm install -D sass.
Verify the install
Confirm fonts, OKLCH surfaces, and focus styles. Toggle light/dark in the header while checking the button below.
Preview (uses the same CSS as this site)
<button type="button" class="btn btn--primary focus-visible">It works</button>
Package exports
| Import | What you get |
|---|---|
pimentcss-design-system | Full CSS bundle (default) |
pimentcss-design-system/core | Tokens, layout, utilities (Sass only) |
pimentcss-design-system/components | UI components (Sass, after core) |
Accessibility
After install
- Use
.focus-visibleor native:focus-visibleon custom controls (3px ring via--focus-ring). - Prefer semantic tokens (
--text-bodyon--surface-page) over raw palette steps in UI. - Respect
prefers-reduced-motion(seetokens/a11y.css).