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

legacy.css

v0.1.0

Published

A classless CSS framework inspired by classic corporate administrative systems.

Readme

legacy.css

Unit coverage

legacy.css is a classless CSS framework for administrative and corporate interfaces. It is inspired by the visual language of classic business, public-sector, and back-office web systems from the 2000s.

The project is not trying to compete with Bootstrap, Tailwind CSS, or component libraries. Its goal is to provide a dependable default stylesheet for semantic HTML.

Philosophy

  • Semantic HTML first.
  • As few CSS classes as possible.
  • Native elements should look usable by default.
  • Classes exist only for patterns that HTML does not represent naturally, such as .panel, .alert, and .container.

For example, a plain <button>, <table>, <input>, <select>, <textarea>, <fieldset>, <legend>, and <details> should already produce a consistent administrative interface.

Why Not Bootstrap?

Bootstrap is a complete component framework with a large API, layout system, JavaScript behaviors, and many utility classes.

legacy.css has a narrower purpose: it styles ordinary HTML so internal tools, prototypes, CRUD screens, documentation pages, and small administrative systems can start with a consistent baseline without adopting a full design system.

Installation

Install from npm:

npm install legacy.css

Or with pnpm:

pnpm add legacy.css

Import the built CSS:

<link rel="stylesheet" href="./node_modules/legacy.css/dist/legacy.css">

Or import the source entry point in a bundler:

@import "legacy.css/src/legacy.css";

For interactive components such as tabs, popovers, modal dialogs, toast notifications, multiselect controls, and drag/drop boards, include the browser script:

<script src="./node_modules/legacy.css/dist/legacy.min.js" defer></script>

The script exposes window.LegacyCss and has no runtime dependency. If jQuery is already present on the page, it also registers small modal, toast, tabs, popover, multiselect, and dragdrop bridges.

CDN

TODO: publish package and document CDN usage.

Usage

Write semantic HTML and let the stylesheet provide the baseline:

<main>
  <h1>Cadastro de fornecedor</h1>

  <form>
    <fieldset>
      <legend>Dados cadastrais</legend>

      <label for="name">Nome</label>
      <input id="name" name="name" type="text">

      <label for="status">Status</label>
      <select id="status" name="status">
        <option>Ativo</option>
        <option>Inativo</option>
      </select>
    </fieldset>

    <button type="submit">Salvar</button>
  </form>
</main>

Set a global color theme on the document element when you need a dark interface:

<html lang="en" data-legacy-theme="dark">

Use data-legacy-theme="light" or omit the attribute for the default light theme. With the browser script, use LegacyCss.theme.set("dark") or LegacyCss.theme.set("light") to update the document theme and store the preference. If jQuery is present before the script runs, use $.theme("dark"), $.theme("light"), or $.theme() to read the current theme.

Project Structure

src/
  legacy.css
  variables.css
  base.css
  typography.css
  forms.css
  multiselect.css
  buttons.css
  toolbars.css
  tables.css
  lists.css
  navigation.css
  pagination.css
  panels.css
  modal.css
  popover.css
  tabs.css
  dragdrop.css
  progress.css
  alerts.css
  toast.css
  badges.css
  utilities.css
  legacy.ts
dist/
docs/

src/legacy.css is the main entry point and imports the other files in order. src/legacy.ts contains browser behavior for tabs, popovers, modal dialogs, toast notifications, multiselect controls, drag/drop boards, and pagination.

Scripts

pnpm run lint
pnpm run build
pnpm run build:min
pnpm run build:js
pnpm run build:all
pnpm run build:docs
pnpm run watch
pnpm run mcp

The CSS build uses Lightning CSS to bundle src/legacy.css into dist/legacy.css and generate dist/legacy.min.css. The JavaScript build keeps a readable dist/legacy.js copy and uses Vite to generate dist/legacy.min.js.

MCP Server

This package includes a small stdio MCP server for agents that need project-aware access to legacy.css source files, built CSS, design tokens, and semantic HTML examples.

Run it from the repository:

pnpm run mcp

Or, after installing the package, use the executable:

legacy-css-mcp

The server exposes resources for the README, source CSS entry point, bundled CSS, and every CSS module under src/. It also exposes tools to list modules, read a module, inspect design tokens, search CSS source, and return small usage snippets.

Configure an MCP Client

Point your MCP client at the server command. From a local checkout, use:

{
  "mcpServers": {
    "legacy-css": {
      "command": "pnpm",
      "args": ["run", "mcp"],
      "cwd": "/absolute/path/to/legacy.css"
    }
  }
}

After installing the package globally or inside a project, use the binary instead:

{
  "mcpServers": {
    "legacy-css": {
      "command": "legacy-css-mcp"
    }
  }
}

Use the first form while developing this repository. Use the binary form when another project wants to consume the published package.

Build Pages Quickly With MCP

Once the server is connected, ask your agent to use the legacy-css MCP server before writing markup. Good prompts are specific about the page type, data fields, and components:

Use the legacy-css MCP server to build a supplier registration page.
Include a toolbar, two fieldsets, status badges, a table of recent suppliers,
and an alert area for validation messages.
Use legacy-css resources and snippets to scaffold an admin dashboard page.
Keep the HTML semantic, prefer native forms and tables, and include the
legacy.css stylesheet and legacy.min.js script.

The MCP server helps agents inspect the available CSS modules, find selectors and custom properties, and reuse semantic snippets for forms, tables, panels, alerts, badges, toasts, popovers, and tabs. For interactive tabs, popovers, modals, toasts, multiselect controls, drag/drop boards, and pagination, include:

<link rel="stylesheet" href="./node_modules/legacy.css/dist/legacy.css">
<script src="./node_modules/legacy.css/dist/legacy.min.js" defer></script>

When reviewing generated pages, keep the project philosophy in mind: start with semantic HTML, rely on native elements first, and use classes only for patterns such as .container, .panel, .alert, .toast, .popover, .badge, .toolbar, .tabs, .modal, .multiselect, .dragdrop, .pagination, and .progress.

Roadmap

  • Expand coverage for semantic elements such as details, summary, dialog, and meter.
  • Refine form layouts without requiring classes.
  • Add print styles for administrative reports.
  • Add accessibility-focused states for validation and interaction.
  • Publish the package to npm.
  • Document CDN usage after publication.
  • Add visual regression pages.

Contributing

Contributions are welcome. Keep the project focused on semantic HTML, conservative defaults, and small class APIs for patterns that HTML does not cover.

Before opening a pull request, run:

pnpm run lint
pnpm run build:all

License

MIT