1. postcss-flexbugs-fixes
PostCSS plugin This project tries to fix all of flexbug's issues
postcss-flexbugs-fixes
Package: postcss-flexbugs-fixes
Created by: luisrudge
Last modified: Fri, 24 Jun 2022 09:58:05 GMT
Version: 5.0.2
License: MIT
Downloads: 25,127,349
Repository: https://github.com/luisrudge/postcss-flexbugs-fixes

Install

npm install postcss-flexbugs-fixes
yarn add postcss-flexbugs-fixes

PostCSS Flexbugs Fixes Build Status

PostCSS plugin This project tries to fix all of flexbug's issues.

bug 4

Input

 .foo { flex: 1; }
.bar { flex: 1 1; }
.foz { flex: 1 1 0; }
.baz { flex: 1 1 0px; }

Output

 .foo { flex: 1 1; }
.bar { flex: 1 1; }
.foz { flex: 1 1; }
.baz { flex: 1 1; }

bug 6

Input

 .foo { flex: 1; }

Output

 .foo { flex: 1 1 0%; }

This only fixes css classes that have the flex property set. To fix elements that are contained inside a flexbox container, use this global rule:

 * {
    flex-shrink: 1;
}

bug 8.1.a

Input

 .foo { flex: 1 0 calc(1vw - 1px); }

Output

 .foo {
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: calc(1vw - 1px);
}

Usage

 postcss([require('postcss-flexbugs-fixes')]);

You can also disable bugs individually, possible keys bug4, bug6 and bug8a.

 var plugin = require('postcss-flexbugs-fixes');
postcss([plugin({ bug6: false })]);

See PostCSS docs for examples for your environment.

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