npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stnd/styles

v0.5.1

Published

--- title: "@stnd/styles" status: active maturity: tree type: package tags: - package - stnd ---

Readme


title: "@stnd/styles" status: active maturity: tree type: package tags:

  • package
  • stnd

@stnd/styles

The CSS typography and design system framework for the Standard Ecosystem.

Overview

@stnd/styles is a comprehensive design system based on classical book design, the Golden Ratio, and OKLCH color spaces. It provides structural layout grids, clean typography scales, and automated color themes for all Standard applications with zero configuration.


1. Mathematical Spacing & Ratios

The system rejects arbitrary pixel coordinates. All spacing, font scaling, and line heights are tied to three mathematical constants:

  • Golden Ratio ($\phi \approx 1.618$): Governs structural widths, block margins, and main layout columns.
  • Silver Ratio ($\theta \approx 1.414$): Governs the typographic scale and base vertical rhythm.
  • Halfstep ($\sqrt{\phi} \approx 1.272$): Square root of the Golden Ratio, used for subheadings, margins, and inline gaps.

2. Typographic Scale

Standard applies a strict modular font scale to prevent typographic clashes. Body font sizes map to CSS custom properties:

| CSS Variable | Scale Class | Value / Application | | :--- | :--- | :--- | | --scale-8 | .scale-8 | Large Display Title | | --scale-4 | h1 | Primary Document Header | | --scale-2 | h2 | Subheadings | | --scale | body | Base Body Text ($1\text{rem}$) | | --scale-d2 | .small, small | Captions, Side Notes | | --scale-d3 | .smaller | Footnotes | | --scale-d4 | .micro | Meta Labels, Short Codes | | --scale-d5 | .nano | Micro-badges |


3. Spacing Grid (Baseline Rhythm)

Vertical rhythm is managed through a base unit --space (usually $1\text{rem}$ / $16\text{px}$). Multiples and fractions are locked:

  • Standard Spacing (Multiples):
    • --space-2, --space-4, --space-8, --space-12
  • Sub-units (Fractions):
    • --space-half (0.5x), --space-third (0.33x), --space-d4 (0.25x), --space-d8 (0.125x)

Elements align to this grid through a strict rule: the sum of an element's font-size, line-height, and margins must always be a multiple of --space.


4. Color System (OKLCH Color Space)

Instead of hardcoding colors, the system generates complete color palettes dynamically. By using OKLCH color mathematics, one seed color generates borders, backgrounds, surfaces, and active states with uniform perceived brightness:

  • --color-accent: Seed brand highlight color.
  • --color-background / --color-foreground: Automatically calculated base canvas colors.
  • --color-surface: Card/panel backgrounds.
  • --color-border: Border colors.
  • --color-success / --color-warning / --color-error / --color-info: Consistent status indicators.

5. Layout Modes & Templates

Specialized styling rules load automatically depending on document attributes:

  • Prose Mode (.prose): Restricts reading width to an optimal measure ($\approx 65\text{ch}$) to prevent eye strain.
  • Dark Mode: Evaluated via system settings (prefers-color-scheme) or overridden with the .theme-dark class.
  • E-Ink Mode (.standard-eink): Strips out all transforms, blurs, and animations, switching colors to pure high-contrast black and white to prevent ghosting on e-readers.

Integration

In your main SCSS stylesheet or Astro entry point:

// Load standard variables and layouts
import "@stnd/styles/standard.scss";

Style Files Anatomy

  • standard.scss: Framework index.
  • _standard-01-token.scss: Variable dictionary.
  • _standard-02-color.scss: Color space equations.
  • _standard-03-typography.scss: Typography stacks.
  • _standard-06-prose.scss: Prose limits and vertical alignments.
  • _standard-11-forms.scss: Field components.
  • _standard-32-eink.scss: High-contrast rules.

What's next — open

  • [ ] CSS framework audit / cleanup — verify that everything is still up to our standard (the initial draft is old; a cleanup is likely possible).

🔗 Liens & Normes

Ce paquet de styles implémente la charte visuelle et les tokens de l'écosystème Standard. Pour plus de détails sur les spécifications graphiques et de code, consultez :