1.0.1 • Published 8 years ago

cssobj-intro-clearfix v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

cssobj-intro-clearfix

cssobj intro to make clearfix easier. code from The very latest clearfix reloaded

Install

  • npm
npm install cssobj-intro-clearfix
  • bower
bower install cssobj-intro-clearfix

Usage

var clearfix = require('cssobj-intro-clearfix')

cssobj(
  { div: {color: 'red'} },
  {
    intro: [
      clearfix()
    ]
  }
)

result css:

.clear:before,
.clear:after {
    content: " ";
    display: table;
}
.clear:after {
    clear: both;
}
.clear {
    *zoom: 1;
}
div {
    color: red;
}

Option

option.className string (default: 'clearfix')

Class name for the clearfix, should without dot

option.useBlock boolean (default: false)

Whether use display: block instead of display: table

see: the different

option.oldIE boolean (default: false)

Whether support oldIE (IE 6,7), by adding *zoom: 1; to container.