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

typolize

v2.0.6

Published

A style reset for creating perfect modular scale in typography and spacing

Readme

Typolize

Typolize provides sensible default styling for good typography on the web. It consists of a reset and customizable variables that let you create harmonious type sizing and spacing.

Customising the following variables will give a completely different feel to the proportion and scale of your site or application.

:root {
    --font-base: 16px;
    --font-ratio: 1.333;
    --line-ratio: 1.5;
    --spacing-ratio: 1;
}

Typesetting

Generating a scale is useful to create typography which shares a common derivative. Sometimes this can lack contrast so by picking out certain steps in the scale it allows you to create a more distinctive look.

Below is an example of customizing the typesetting in Typolize.

:root {
    --font-size-body: var(--font-size-0);
    --font-size-h1: var(--font-size-7);
    --font-size-h2: var(--font-size-5);
    --font-size-h3: var(--font-size-3);
    --font-size-h4: var(--font-size-2);
    --font-size-h5: var(--font-size-1);
    --font-size-h6: var(--font-size-0);
    --font-size-small: var(--font-size--1);
}

Spacing

Control spacing between type by applying margins using either the --em or --rem variable with a range between -2 and 10.

For example:

*+* {
	margin-top: var(--em-1);
}

h1, h2, h3, h4, h5, h5, h6 {
    margin-top: var(--em-3);
    margin-bottom: var(--em-2);
}

section {
    margin-top: var(--rem-4);
    margin-bottom: var(--rem-6);
}

Leading Trim

Apply leading trim to any element using --leading-trim: '', --leading-trim-over: '' or --leading-trim-under: ''.

By class

.button {
    --leading-trim: '';
}

Or selectors

h1, h2, h3, h4, h5, h6, p, li {
    --leading-trim: '';
}

Adjust to different fonts by setting the --cap-height which is a percentage of the font-size.

:root {
    --cap-height: 0.75;
}

See the demo for examples of it being used. Take a look at the default theme for an example of the settings.

Install

  1. Download directly from a CDN using unpkg

    https://unpkg.com/typolize/dist/typolize.css

    Or use in your node project using the following

    npm install typolize

    Import into your stylesheet

    @import 'typolize'
  2. Customize using the variables explained above

Development

To customise the output or for development purposes.

  1. Download or fork the repo and install dependencies
    npm install
  2. Make changes to src/typolize.css
  3. Build styles
    npm run build
  4. Styles are outputted to dist/typolize.css