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

@dzgrid/theme

v1.12.0

Published

An optional stylesheet for DzGrid: tzslot's palette, light and dark, more contrast, forced colours; two showcase themes; bridges to Tailwind CSS 3 and 4 and Bootstrap 5.3. Plain CSS.

Readme

@dzgrid/theme

An optional stylesheet for DzGrid: colours, spacing and interaction states (header, hover, selection, focus, filters, popups), light and dark, more contrast, forced colours. Plain CSS, no JavaScript. The grid's layout CSS is injected by @dzgrid/dom; this package only makes it presentable. Every text and part is checked for contrast.

Import

import '@dzgrid/theme';             // the same file as '@dzgrid/theme/dzgrid.css'
import '@dzgrid/theme/contrast.css'; // optional: more contrast (see below)

From CSS: @import "@dzgrid/theme/dzgrid.css";. With Sass, @use "@dzgrid/theme/dzgrid" gives the source, whose $tz-palette map can be overridden with with (...).

In Angular, add node_modules/@dzgrid/theme/dzgrid.css to the styles of angular.json.

Showcase themes

Two optional themes, each one more import (or one attribute on an area):

import '@dzgrid/theme';
import '@dzgrid/theme/midnight.css'; // dark elegant, with a light twin
// or '@dzgrid/theme/clinic.css';    // light medical, with a dark twin

Imported, a theme styles every grid of the page; data-dzg-skin="midnight" (or "clinic") on any container styles only that area, so both can stand side by side (the last file imported themes the page). Light and dark follow the system or data-theme, as below. Every colour is given by hand and checked for contrast; more contrast (below) still wins over them.

Tailwind CSS and Bootstrap

A bridge maps the grid's colours, font and corners to your framework's variables, dark mode included. Tailwind CSS 4, in the CSS file Tailwind builds:

@layer theme, base, dzgrid, components, utilities;
@import "tailwindcss";
@import "@dzgrid/theme";
@import "@dzgrid/theme/tailwind.css";

Tailwind CSS 3: @dzgrid/theme/tailwind3.css (through Tailwind's build, with the unlayered copy). Bootstrap 5.3: @dzgrid/theme/bootstrap.css (follows data-bs-theme). A bridge wins over a showcase theme: with a bridge, the grid wears your framework's colours; to show Midnight or Clinic, load no bridge. Each setup, and the classes the grid takes (cellClass, rowClass, headerClass, badge({ classes })), in docs/theme-in-3-lines.md.

Cascade layer

The theme's rules sit in the cascade layer dzgrid (each file opens with @layer dzgrid.layout, dzgrid.theme, dzgrid.skin, dzgrid.bridge, dzgrid.contrast;), and so does the layout @dzgrid/dom injects. Your own classes win over the grid's look without !important. If you layer your own CSS, name the order once, first: e.g. @layer theme, base, dzgrid, components, utilities;.

If an unlayered reset of yours (Tailwind 3's preflight, Bootstrap's Reboot) would beat the layered grid, import @dzgrid/theme/dzgrid.unlayered.css (and contrast.unlayered.css) instead: the same rules outside the layer.

CSS variables

The palette is tzslot's: a page that themes tzslot themes the grid. Each colour is a light-dark() pair declared on :root.

| Variable | Used for | | --- | --- | | --tz-bg, --tz-bg-raised | the grid's surface, headers and popups | | --tz-fg, --tz-fg-muted | text, secondary text | | --tz-border | lines between cells, popups | | --tz-accent, --tz-accent-fg | focus, selection, primary buttons | | --tz-danger, --tz-warning, --tz-success | errors, refused edits, badges |

What the grid derives can be set on any ancestor of .dzg (each has a fallback on the palette): --dzg-font, --dzg-radius, --dzg-row-height, --dzg-cell-padding-inline, --dzg-header-bg, --dzg-row-hover-bg, --dzg-row-selected-bg, --dzg-focus-ring, --dzg-stale-fg, --dzg-refused-bg, --dzg-flash, --dzg-flash-color, --dzg-line (rule width), --dzg-pill-radius, --dzg-header-size, --dzg-header-tracking (none in Arabic), --dzg-select-bar (a selected row's bar at its start, 0 by default); with fresh-rows.css: --dzg-fresh-color, --dzg-fresh-bg, --dzg-fresh-bar (a new row's tint and bar).

:root {
  --tz-accent: light-dark(#0f766e, #5eead4);
  --dzg-row-height: 2.25rem;
}

Light and dark

By default the grid follows the system (color-scheme: light dark). To force one, set data-theme="light" or data-theme="dark" on the root or on any ancestor of the grid. The bridges follow Tailwind's .dark class and Bootstrap's data-bs-theme.

More contrast and forced colours

contrast.css switches to a high-contrast palette when the system asks for more contrast (prefers-contrast: more) or under data-contrast="more"; data-contrast="normal" on the root opts out. In forced-colours mode (Windows High Contrast) the theme uses the system's colours.

Licence

MIT. See LICENSE.