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

user-agent-base

v0.2.2

Published

Portable CSS/SCSS reset and base layer for web projects.

Readme

user-agent-base

user-agent-base is a portable reset and base layer for web projects. It gives you a neutral starting point for typography, spacing, media, forms, tables, and semantic HTML, while exposing most of its styling through CSS custom properties. The reset is part of the baseline and should always be loaded with the package.

What you get

  • A small reset layer for predictable element defaults.
  • A modular base layer grouped by HTML families.
  • A single documented entrypoint that includes both reset and base styles.
  • Published CSS artifacts for projects that want to consume plain CSS.

Install

npm install user-agent-base

Entry points

SCSS

Use the package root when you want the full baseline, including the reset:

@use 'user-agent-base';

CSS

Use the published CSS file when your stack does not compile Sass:

@import 'user-agent-base/main.css';

Design approach

The base layer is organized by families of HTML elements rather than by visual components. That makes it easier to reason about what each module changes and to override only the area you need.

The main source of customization is CSS variables defined in the base entrypoint. You can override them in your own stylesheet:

:root {
  --body-font-family: system-ui, sans-serif;
  --body-color: #222;
  --heading-font-family: Georgia, serif;
  --link-color: #0b57d0;
  --code-bg-color: rgba(0, 0, 0, 0.06);
}

Module families

Structure

Applies defaults to html, body, and common semantic wrappers such as main, header, footer, section, article, aside, and nav.

Use this when you want a consistent page shell with predictable margins, typography, and body colors.

Headings

Normalizes h1 to h6 and heading groups.

Use this for article pages, documentation, or any content site where heading scale and spacing matter.

Content flow

Handles p, blockquote, and hr.

Use this for editorial content where paragraph rhythm and separators should stay consistent.

Anchors

Handles a and explicit link-state pseudo-classes.

The link state order follows LVHA (:link, :visited, :hover, :active) to keep state precedence predictable.

Use this when you want a stable default for link states while keeping color and decoration tokens easy to override.

Inline content

Handles emphasis, metadata text, marks, subscript and superscript, bidirectional text, and ruby annotations.

Use this for long-form content that mixes prose, inline references, abbreviations, citations, and language-specific annotations.

Code

Styles code, kbd, samp, tt, and pre with monospace typography and compact block presentation.

Use this for docs, technical articles, changelogs, and API examples.

Forms

Covers form controls, fieldsets, labels, focus states, disabled states, and common input types.

Use this when you need a clean baseline for login forms, filters, contact forms, or admin interfaces.

Interactive

Styles disclosure and dialog-related elements such as details, summary, dialog, and noscript.

Use this for accordions, progressive disclosure panels, and simple modal patterns.

Lists

Normalizes ordered and unordered lists, menu lists, and description lists.

Use this for navigation, outlines, feature lists, glossaries, and definition content.

Media

Covers responsive media and embedded content such as img, video, picture, svg, iframe, object, audio, and figures.

Use this for galleries, embeds, responsive illustrations, and captioned media.

Tables

Styles table structure, headers, captions, rows, and cells.

Use this for data tables, pricing tables, and comparison matrices.

Accessibility

Includes accessibility-oriented defaults such as reduced-motion handling.

Use this as a lightweight foundation before layering on your own interactions and transitions.

Unstylable coverage

Tracks non-rendered or non-stylable elements so the base layer stays complete and easy to audit.

Use this mainly as a maintenance and coverage aid; it is not intended to affect visible layout.

Recommended usage scenarios

Blog or documentation site

Import the package root and override the typography tokens first. This gives you a stable foundation for headings, paragraphs, lists, code, and tables.

Application shell

Import the package root, then only override the variables for body, forms, and links. This keeps the UI neutral without forcing a design system.

Plain CSS integration

If your project does not use Sass, import the compiled CSS file directly and override the CSS variables after the import.

Advanced customization

The source tree keeps the reset and base layers separated internally so the package can be maintained cleanly, but the documented public contract is the combined baseline.

Project structure

  • index.scss: Package-level SCSS entrypoint.
  • src/base/: Base families organized by HTML function.
  • src/reset/: Reset-only layer.
  • dist/: Generated CSS artifacts published with the package.

License

ISC