1. postcss-clearfix
PostCSS plugin that adds `fix` and `fix-legacy` attributes to the `clear` property, for self-clearing of children.
postcss-clearfix
Package: postcss-clearfix
Created by: seaneking
Last modified: Fri, 24 Jun 2022 09:36:28 GMT
Version: 2.0.1
License: MIT
Downloads: 33,673
Repository: https://github.com/seaneking/postcss-clearfix

Install

npm install postcss-clearfix
yarn add postcss-clearfix

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

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code