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

postcss-typescale

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-typescale

A PostCSS plugin to create a typographic scale.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-typescale

npm version Build Status Dependency Status

francoisromain.github.io/postcss-typescale

A PostCSS plugin to set type.


Installation

Install the npm package:

$ npm install postcss-typescale --save-dev

Require with PossCSS:

postcss([ require('postcss-typescale') ])

See PostCSS docs to setup with Gulp, Grunt, Webpack, npm scripts…


Configuration (optional)

Global settings (and default values):

@typescale ([name]) {
  scale: 1.25;          /* See type-scale.com to choose a scale */
  font-size: 1rem;      /* default font size */
  line-height: 1.5rem;  /* If no unit is provided, line-height is relative to font-size */
}
  • name (optional): custom identifier. If no name is provided, the default settings are overwritten.

Usage

typescale: ([name]) [index] ([line-height-fraction])

  • name (optional, default = default): string identifier referring to a settings atRule.
  • index: positive or negative integer. font-size = font-size * scale index.
  • line-height-fraction (optional, default = 1): float or fraction. line-height = line-height * line-height-fraction.
Examples
.my-title {
  typescale: 3 1.5;
}

.my-small-text {
  typescale: -1;
}

.my-extra-small-text {
  typescale: -2 0.5;
}

input, output, markup, demo

Keywords

FAQs

Package last updated on 26 Apr 2016

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