postcss-clearfix

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

MIT 13 个版本
安装
npm install postcss-clearfix
yarn add postcss-clearfix
pnpm add postcss-clearfix
bun add postcss-clearfix
README

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

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

版本列表
2.0.1 2017-07-26
2.0.0 2017-07-18
1.0.0 2016-03-09
0.3.0 2016-02-29
0.2.1 2016-02-16
0.2.0 2015-08-20
0.1.6 2015-08-20
0.1.5 2015-08-20
0.1.4 2015-08-20
0.1.3 2015-07-26
0.1.2 2015-07-22
0.1.1 2015-07-21
0.1.0 2015-06-20