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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mskcc/typography

v0.0.3

Published

This package provides a comprehensive solution for integrating custom fonts into your project. It includes a reset stylesheet, variable font definitions, and utilities for managing font weights and styles.

Downloads

39

Readme

@mskcc/typography

This package provides a comprehensive solution for integrating custom fonts into your project. It includes a reset stylesheet, variable font definitions, and utilities for managing font weights and styles.

Features

  1. Variable Fonts: Utilizes MSK Sans variable fonts for both Pro and Consumer versions.
  2. CSS Reset: Includes a modern CSS reset to ensure consistent styling across browsers.
  3. Responsive Typography: Defines responsive font sizes and line heights for headings and body text.
  4. Customizable: Allows easy customization through CSS variables.
  5. CDN Support: Fonts can be loaded from a CDN for faster loading times.
  6. Local Development: Supports local development with a script to generate CSS for local use.

CSS Variables

  --msk-font-weight-light;
  --msk-font-weight-normal;
  --msk-font-weight-medium;
  --msk-font-weight-semibold;
  --msk-font-weight-bold;

  --msk-font-family-base;
  --msk-font-size-base;
  --msk-line-height-base;
  --msk-letter-spacing-base;

  --msk-h1-font-weight;
  --msk-h2-font-weight;
  --msk-h3-font-weight;
  --msk-h4-font-weight;
  --msk-h5-font-weight;
  --msk-h6-font-weight;

  --msk-h1-font-size;
  --msk-h2-font-size;
  --msk-h3-font-size;
  --msk-h4-font-size;
  --msk-h5-font-size;
  --msk-h6-font-size;

  --msk-h1-line-height;
  --msk-h2-line-height;
  --msk-h3-line-height;
  --msk-h4-line-height;
  --msk-h5-line-height;
  --msk-h6-line-height;

  --msk-h1-letter-spacing;
  --msk-h2-letter-spacing;
  --msk-h3-letter-spacing;
  --msk-h4-letter-spacing;
  --msk-h5-letter-spacing;
  --msk-h6-letter-spacing;

Installation

npm install @mskcc/typography

Usage

CDN Usage

<link rel="stylesheet" href="cdn-link" />

<!-- or -->

<style>
  @import url('cdn-link');
</style>

CDN Links

| description | link | | ------------------- | ---------------------------------------------------------------------------------------- | | reset | https://cdn.jsdelivr.net/npm/@mskcc/typography@latest/reset.css | | consumer font | https://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-consumer.css | | pro font | https://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-pro.css | | consumer with reset | https://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-consumer-with-reset.css | | pro with reset | https://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-pro-with-reset.css |

Local Usage

  1. Install the package using npm.
  2. Import the CSS file in your project:
@import '@mskcc/typography/msk-sans-pro.css';

or for the consumer version:

@import '@mskcc/typography/msk-sans-consumer.css';

Using the CSS Variables

Here's an example of applying the MSK font family to a button:

.button {
  font-family: var(--msk-font-family-base);
  font-weight: var(--msk-font-weight-medium);
  font-size: var(--msk-font-size-base);
}

This will ensure your button uses the MSK Sans font with consistent styling. You can also combine it with other typography variables for complete control:

.primary-button {
  font-family: var(--msk-font-family-base);
  font-weight: var(--msk-font-weight-semibold);
  font-size: var(--msk-font-size-base);
  letter-spacing: var(--msk-letter-spacing-base);
  line-height: var(--msk-line-height-base);
}