2.0.1 • Published 7 years ago

postcss-clearfix v2.0.1

Weekly downloads
15,897
License
MIT
Repository
github
Last release
7 years ago

PostCSS Clearfix

NPM version Build Status Dependency Status

PostCSS plugin that adds a fix attribute to the clear property, for self-clearing of children. The outputted clearfix works in IE8+.

Part of Rucksack - CSS Superpowers.

Input

.cleared {
  clear: fix;
}

Output

.cleared:after{
  content: '';
  display: block;
  clear: both;
}

Usage

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

See PostCSS docs for examples for your environment.

Options

PropertyTypeDefaultDescription
displayString'block'Set the display property outputted in the ::after clearfix (eg: use 'table' to prevent collapsed margins on cleared items)

MIT © Sean King