Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.51 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.51 KB

PostCSS Wrap Lines Build Status

PostCSS plugin to wrap lines after a specified number of characters.

This functionality is useful if a tool in your chain has a limit on characters-per-line.

.foo {
    html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;}
}
.foo {
  html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
  article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{
  display:block}audio,canvas,progress,video{display:inline-block;}
}

Installation

npm i postcss-wrap-lines --save-dev

Usage

const postcss = require('postcss');
const postcssWrapLines = require('postcss-wrap-lines');

const options = {
    // Your options
};

postcss([postcssWrapLines(options)])

See PostCSS docs for examples for your environment.

Options

Key Default Explanation
debug false Show information for debugging
maxWidth 32768 The maximum characters allowed per line