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

actual-css

v0.1.0

Published

Plain CSS component framework with semantic classes, universal variants, small tokens, theme hooks, and progressive enhancements.

Readme

Actual CSS

Plain CSS component framework for new projects. Semantic classes, shared variants, small tokens, theme hooks, and progressive enhancement.

Actual CSS claims a small set (see reserved-classes.json) of global class names.

For existing projects: cascade layers, import order, or an optional prefix transform.

Install

npm install actual-css

Import the full framework in your CSS:

@import "actual-css";

Or import only the pieces you use:

@import "actual-css/css/reset";
@import "actual-css/css/base";
@import "actual-css/css/tokens";
@import "actual-css/css/theme";
@import "actual-css/css/intents";
@import "actual-css/css/variants";
@import "actual-css/css/layout";
@import "actual-css/css/grid";
@import "actual-css/css/components/button";
@import "actual-css/css/components/card";
@import "actual-css/css/forms";
@import "actual-css/css/components/flyout";
@import "actual-css/css/utilities";
@import "actual-css/css/components/join";
/* Keep the focus baseline after components and controls. */
@import "actual-css/css/focus";

focus is the final interactive baseline in modular builds: older browsers retain a visible :focus outline, while browsers with :focus-visible avoid showing it for pointer focus.

You can also use the compiled file directly:

<link rel="stylesheet" href="actual.min.css">

Usage

Add classes to your HTML. Components define the structure, variants change the style, and intents set the color.

<button class="btn">Click me</button>
<button class="btn primary">Save</button>
<button class="btn primary outline lg">Publish</button>
<button class="btn success soft sm">Confirm</button>

Intents such as .primary, .secondary, .success, .warning, and .danger work across components.

Variants such as .solid, .soft, and .outline are shared by components like buttons, badges, alerts, and cards. .ghost and .link are button-only variants.

Size variants .sm and .lg scale controls consistently.

Public Class Grammar

Actual CSS uses a small unprefixed class grammar:

.component [intent] [variant] [size] [modifier]

Components, layout helpers, form helpers, and utilities claim their documented class names. Intents are .primary, .secondary, .success, .warning, and .danger; shared variants are .solid, .soft, and .outline; button-only variants are .ghost and .link; shared sizes are .sm and .lg.

Undocumented is-* classes are runtime internals.

What's included

Components — button, card, badge, alert, table, accordion, breadcrumb, pagination, skeleton, spinner, avatar, key, meter, progress, joined controls, and busy indicators.

UI components — dialog, drawer, flyout, tooltip, tabs, scrollspy, context menus, and other components that rely on JavaScript or modern platform behavior.

Patterns — actions, navbar, and overline. These are regular source files and can be imported only when needed.

Layout primitives.stack, .cluster, .grid, .switcher, .center, .media, .frame, .app-shell, .sidebar-layout, and .container-query.

Forms — field layout, choices, switches, selects, custom selects, control base styles, validation states, and form actions.

Prose — opt-in rich text styling with .prose.

Utilities — spacing, gaps, logical margins, truncation, muted text, circles, screen-reader-only text, text wrapping, and link variants.

Theme hooks — public tokens for color, radius, shadow, motion, and typography. Reference presets in src/css/themes/ are demo material, not default CSS or public package entrypoints.

Optional CSS

@import "actual-css/css/layer";
@import "actual-css/css/optional/index";

Browse src/css/optional/ for available modules such as custom scrollbars, scroll snap rails, extra utilities, and optional layout helpers.

JavaScript enhancers

Some components can be enhanced with JavaScript: dialog/drawer, flyout, tooltip, tabs, scrollspy, context menu, floating UI, opt-in data-filter input filtering, and input masks.

Use the full module:

<script src="actual.js" type="module"></script>

Or import only the enhancers you need:

import "actual-css/js/dialog";
import "actual-css/js/flyout";
import "actual-css/js/filter";
import "actual-css/js/mask";
import "actual-css/js/tooltip";

The package does not maintain separate partial bundles. Modular entrypoints map to source files, so each project can compose the framework shape it needs. To customize the full runtime, comment the imports you do not want in src/js/index.js and rebuild the JavaScript bundle. JavaScript modules are safe to import during server-side rendering; outside a browser, registration is a no-op.

For project-specific behavior, use actual-css/js/enhance and the small input helpers rather than patching built-in modules. See JavaScript for custom filters, textarea autogrow, ajax forms, and htmx-like patterns.

Distribution

  • dist/actual.css — readable modern CSS.
  • dist/actual.min.css — the same CSS, minified for production.

Modern syntax such as light-dark(), color-mix(), @container, :has(), 100dvh, and 100vi is preserved in the distributed files.

Actual CSS does not currently ship a separate compatibility build. It is designed as progressive enhancement: modern features are guarded with @supports where needed, while older browsers still receive core layout, forms, and components.

For more conservative fallbacks, import and compose the source entrypoints directly.

Browser support

Actual CSS is built around progressive enhancement.

  • Degraded — Firefox 78+, Safari 14+, Chromium 88+. Core layout, typography, forms, and components.
  • Minimum — Firefox 98+, Safari 15.4+, Chromium 99+. Dialog, drawer, and top-layer behavior.
  • Intermediate — Firefox 121+, Safari 16+, Chromium 106+. :has(), container queries, alert icon layout, and intent tints.
  • Recommended — Firefox 129+, Safari 17.5+, Chromium 123+. light-dark(), color-mix(), and full theming.

Cascade layers

Actual CSS is layer-compatible, not layer-dependent. The default actual.css file is unlayered. See docs/design-notes/cascade-layer.md for details.

AI Disclosure

Actual CSS uses AI-assisted tooling for code generation, refactoring, and debugging. Patterns and architecture come from hand-written prototypes and iterative human-driven refinement. AI output is reviewed, tested, and owned by the maintainer.

License

MIT

Docs

Start with docs/README.md.