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

karuto-typography-temp

v0.0.12

Published

OT typography groupings for desktop web

Downloads

7

Readme

typography-desktop

What is this?

typography-desktop is a package that exports font grouping CSS classes, such as .xlarge-bold, for consumer web projects to consume.

These classes are generated dynamically based on the latest version of otkit-typography-desktop design token.

Why are you doing this?

The way different consumer web teams apply typography styling to their front end components is very fragmented. We have lots of duplications, overrides and human errors.

We try to solve this problem by enforcing consistency via encapsulating the entire design decision inside CSS classes.

I choose CSS class as the transport mechanism because of its simplicity, familiarity and flexibility.

How is this package set up?

Let's briefly explain the decision flow when it comes to typography. Let's use .xlarge-bold as example.

  1. Designers decided xlarge-bold should be one of the desktop web typography groupings inside their design system.
  2. Design tokens deconstructs xlarge-bold into atomic elements, such as xlarge-bold-font-size, xlarge-bold-font-weight and xlarge-bold-line-height, and stores them inside otkit-typography-desktop token.
  3. We import these values from design tokens, reconstructing the composited .xlarge-bold, which serves as a 1:1 model / engineering translation of the design decision.
  4. You, as a developer of a consumer web project, can then use it.

How do I use it / how does it help me?

Let's expand bullet point number 4 from above.

TL;DR: No more repeating the same CSS declarations - font sizes, font weights, line heights, even class compositions - over and over again!

To use it, simply install:

npm i --save-dev @ot-react-ui/typography-desktop

Then depends on your choice of CSS technologies, there are many ways to consume this package:

CSS modules

.some-component-class {
  composes: xlarge-bold from '@ot-react-ui/typography-desktop';
}

Sass / Scss

@import '@ot-react-ui/typography-desktop';
.some-component-class {
  @extend: .xlarge-bold; // or you can just use the class names directly
}

Vanilla CSS

If your project uses vanilla CSS you can simply import it in your bundle then use the class names directly.

Developement guide

Environment

This package requires node 8. Other node versions may throw errors when you run scripts.

This package requires npm 5, if you'd like to publish. We are using features that's only available after npm 4.

Installation

npm i

Publishing

Before you publish, please make sure your .npmrc is pointing to the OpenTable private registry with correct credentials.

Please also make sure you have already installed all dependencies for this package and have the correct node / npm versions.

This package should only be published by running:

npm run update-publish

Support

Please contact Vincent Zhang and Lin Xu if you have any questions regarding this package.