Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mskcc/typography

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@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.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
58
decreased by-23.68%
Maintainers
0
Weekly downloads
 
Created
Source

@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>
descriptionlink
resethttps://cdn.jsdelivr.net/npm/@mskcc/typography@latest/reset.css
consumer fonthttps://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-consumer.css
pro fonthttps://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-pro.css
consumer with resethttps://cdn.jsdelivr.net/npm/@mskcc/typography@latest/msk-sans-consumer-with-reset.css
pro with resethttps://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);
}

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc