JSPM

postcss-imperial

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q17443F
  • License MIT

PostCSS plugin to support lengths in Imperial and customary units

Package Exports

  • postcss-imperial

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-imperial) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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