postcss-clearfix

PostCSS plugin that adds `fix` and `fix-legacy` attributes to the `clear` property, for self-clearing of children.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
postcss-clearfix
4722.0.17 years ago9 years agoMinified + gzip package size for postcss-clearfix in KB

Readme

PostCSS Clearfix
!NPM versionnpm-imagenpm-url !Build Statustravis-imagetravis-url !Dependency Statusdaviddm-imagedaviddm-url
PostCSSPostCSS 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 PostCSSPostCSS docs for examples for your environment.

Options

Property | Type | Default | Description
--------- | ------ | --------- | ------------
display | String | 'block' | Set the display property outputted in the ::after clearfix (eg: use 'table' to prevent collapsed margins on cleared items)

MIT © Sean King