postcss-lineheight-warn

A PostCSS plugin that logs warnings where unit values are used for line-height in the CSS.

Usage no npm install needed!

<script type="module">
  import postcssLineheightWarn from 'https://cdn.skypack.dev/postcss-lineheight-warn';
</script>

README

PostCSS line-height Warning Build Status

A dead simple PostCSS plugin that gives you a warning when a unit value is used on your line-height rules. It does not convert any values or performs any changes; it merely logs a warning.

Installation

npm install --save-dev postcss-lineheight-warn

.foo {
    line-height: 3em;
}

Will log:

WARNING in ./~/css-loader!./~/postcss-loader!./sample.css
postcss-lineheight-warn: line-height should be unitless: line-height: 3em; at line 2

Usage

postcss([ require('postcss-lineheight-warn') ])

See the /example folder for a Webpack example.