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

@uncinq/css-base

v0.1.0

Published

Framework-agnostic CSS foundation — reset, native element styles, and layout primitives.

Readme

@uncinq/css-base

Framework-agnostic CSS foundation — reset, native element styles, and layout primitives.

What's included

Reset

Based on the Josh W Comeau custom CSS reset, with additions by Un Cinq:

  • Box model normalization (box-sizing: border-box)
  • Default margin removal
  • interpolate-size: allow-keywords for keyword animations (behind prefers-reduced-motion: no-preference)
  • Text rendering (-webkit-font-smoothing, text-rendering, font-variant-ligatures)
  • Media defaults (display: block, max-width: 100% on img, picture, video, canvas, svg)
  • Form controls font inheritance
  • Overflow wrap on headings and paragraphs
  • text-wrap: pretty on p, text-wrap: balance on headings

Base

Styles for native HTML elements, each driven by design tokens from @uncinq/design-tokens and @uncinq/component-tokens:

| File | Element(s) | | --- | --- | | base/body.css | body — background, text color, font family/size/weight/line-height | | base/headings.css | h1h6 — color, font, size scale via --font-size-heading-01…06 | | base/typography.css | p — spacing, max-width | | base/link.css | a — color, underline style, hover transition | | base/blockquote.css | blockquote, cite — border-left, italic, muted color | | base/code.css | code, pre, kbd, samp — monospace font, background, inline vs block | | base/list.css | ul, ol, li — content list indent and spacing (prose context) | | base/address.css | address — removes italic, resets paragraph spacing | | base/details.css | details, summary — border, padding, open state, hover shadow | | base/figure.css | figure, figcaption — flex layout, responsive caption direction | | base/form.css | label, legend, input, select, textarea, [type='checkbox'], [type='radio'] | | base/picture.css | pictureinline-block display | | base/table.css | table, th, td, thead — collapse, padding, header weight | | base/time.css | time — small font size | | base/video.css | video — fluid width, auto height |

Layouts

Reusable layout utility classes:

| File | Class(es) | | --- | --- | | layouts/container.css | .container — centered, max-width responsive container with gutter | | layouts/grid.css | .grid — CSS grid wrapper with responsive --grid-column custom property | | layouts/row.css | .row, .col-xsmall, .col-small, .col-medium, .col-large, .offset-center, .offset-end |


CSS cascade layers

All rules are scoped to named cascade layers, making every declaration safely overridable:

| Layer | Contents | | --- | --- | | @layer config | Reset and design tokens — foundational baseline, lowest priority | | @layer base | Native element styles | | @layer layouts | Layout utility classes |

The intended layer order for a full stack is:

@layer config, base, layouts, vendors, components;

With cascade layers, the last layer in the order wins. Placing config first gives it the lowest priority — the reset and token defaults can never accidentally override base styles, component styles, or project overrides. @layer base and @layer layouts sit above it but below vendor and component styles.

Any layer can be overridden in your own project by importing after this package and writing to the same layer name:

@import '@uncinq/css-base'; /* package defaults */

/* your project overrides — same layer, wins by order */
@layer base {
  a {
    --color-link: #0070f3;
  }
}

→ MDN: Using CSS cascade layers


Installation

npm install @uncinq/css-base
# or
yarn add @uncinq/css-base

Usage

/* everything — reset + base + layouts */
@import '@uncinq/css-base';

/* or by group */
@import '@uncinq/css-base/css/reset.css';
@import '@uncinq/css-base/css/base.css';
@import '@uncinq/css-base/css/layouts.css';

/* or file by file */
@import '@uncinq/css-base/css/base/body.css';
@import '@uncinq/css-base/css/base/headings.css';
@import '@uncinq/css-base/css/layouts/container.css';
@import '@uncinq/css-base/css/layouts/row.css';

File structure

css/
  index.css                   ← imports reset, base, layouts in order
  reset.css                   ← Josh W Comeau reset + Un Cinq additions, in @layer config
  base.css                    ← barrel, imports all base/*
  layouts.css                 ← barrel, imports all layouts/*
  base/
    blockquote.css            ← blockquote + cite — border-left, italic, muted color
    code.css                  ← code, pre, kbd, samp — monospace, background, padding
    list.css                  ← ul, ol, li — content list indent and spacing
    address.css               ← address — removes italic, resets paragraph spacing
    body.css                  ← body — background, color, font, rendering
    details.css               ← details + summary — border, padding, open/hover states
    figure.css                ← figure + figcaption — flex layout, responsive captions
    form.css                  ← label, input, select, textarea, checkbox, radio
    headings.css              ← h1–h6 — color, font family, size scale
    link.css                  ← a — color, underline, hover transition
    picture.css               ← picture — inline-block display
    table.css                 ← table, th, td — collapse, padding, header weight
    time.css                  ← time — xs font size
    typography.css            ← p — spacing, max-width
    video.css                 ← video — fluid width
  layouts/
    container.css             ← .container — centered, responsive max-width
    grid.css                  ← .grid — CSS grid with responsive column custom property
    row.css                   ← .row + column/offset modifiers

Peer dependencies

This package requires @uncinq/design-tokens and @uncinq/component-tokens to resolve the CSS custom properties it references. It does not bundle any token values itself.

Token categories referenced across base and layout files include:

  • --color-bg, --color-text, --color-heading, --color-link, --color-border
  • --font-family-text, --font-family-heading
  • --font-size-*, --font-weight-*, --line-height-*
  • --spacing-*, --max-width-*
  • --transition-normal
  • --border-width-*, --border-style-*, --radius-*
  • Component-scoped tokens: --input-*, --select-*, --textarea-*, --checkbox-*, --radio-*, --details-*, --table-*, --figure-*, --label-*
  • Layout tokens: --gutter, --gap, --columns, --container-max-width-*, --flex-*, --spacing-section

Install both peer dependencies:

npm install @uncinq/design-tokens @uncinq/component-tokens

@uncinq/design-tokens — primitive and semantic design tokens (color, typography, spacing, …) → @uncinq/component-tokens — component-scoped tokens (form, table, figure, …)

Then import them before this package so the tokens resolve correctly:

@import '@uncinq/design-tokens';
@import '@uncinq/component-tokens';
@import '@uncinq/css-base';

References