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

karuto-typography-temp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karuto-typography-temp

OT typography groupings for desktop web

  • 0.0.12
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 12 Jul 2018

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