postcss-imperial

1.0.0 • Public • Published

PostCSS Imperial Build Status

PostCSS plugin to support lengths in Imperial and customary units.

Inspired by Are Imperial Measurements outdated? | Number Hub with Matt Parker | Head Squeeze.

Unit relations graph

Input

.poster {
  height: 2ft;
  width: 1yd;
}

Output

.poster {
  height: 24in;
  width: 36in;
}

Usage

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

See PostCSS docs for examples for your environment.

Supported Units

  • thou (th, mil)
  • twip
  • point (pt)
  • line, poppyseed
  • pica (pc)
  • barleycorn
  • digit
  • finger
  • inch (in)
  • stick
  • nail
  • palm
  • hand
  • shaftment
  • link
  • span
  • foot (ft)
  • cubit
  • pace
  • yard (yd)
  • ell
  • grade, step
  • fathom (ftm)
  • rod, pole, perch
  • rope
  • chain
  • ramsdenschain
  • shackle
  • skein
  • cable
  • furlong (fur)
  • romanmile
  • mile (mi)
  • nauticalmile
  • league (lea)
  • spindle

Notes

  1. Plurals are supported for convenience.
  2. The ch abbreviation is not supported since it already exists in CSS.

References

Dependencies (3)

Dev Dependencies (4)

Package Sidebar

Install

npm i postcss-imperial

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • seb