Skip to content

Implements the font-variant-* properties for browsers that don't yet support them.

Notifications You must be signed in to change notification settings

ianstormtaylor/rework-font-variant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rework-font-variant

Adds support for the nice font-variant CSS properties that are shorthand for the really awkward font-feature-settings values.

This is part of the CSS spec, but no browser supports the shorthands yet.

Installation

$ npm install rework-font-variant

Example

var variant = require('rework-font-variant');

rework(css)
  .use(variant)
  .toString();

API

In your CSS, use the font-variant properties like the spec tells you to:

h2 {
  font-variant-caps: small-caps;
}

table {
  font-variant-numeric: lining-nums;
}

Or use the font-variant shorthand:

table {
  font-variant: small-caps lining-nums;
}

License

MIT

About

Implements the font-variant-* properties for browsers that don't yet support them.

Resources

Stars

Watchers

Forks

Packages

No packages published