1. postcss-replace-overflow-wrap
PostCSS plugin to replace overflow-wrap with word-wrap or optionally retain both declarations.
postcss-replace-overflow-wrap
Package: postcss-replace-overflow-wrap
Created by: MattDiMu
Last modified: Fri, 24 Jun 2022 10:46:13 GMT
Version: 4.0.0
License: MIT
Downloads: 24,978,887
Repository: https://github.com/MattDiMu/postcss-replace-overflow-wrap

Install

npm install postcss-replace-overflow-wrap
yarn add postcss-replace-overflow-wrap

PostCSS Replace Overflow Wrap CSS Standard Status Build Status

PostCSS plugin to replace overflow-wrap with word-wrap. May optionally retain both declarations.

 /* before */
.foo {
    overflow-wrap: break-word;
}

/* after */
.foo {
    word-wrap: break-word;
}
 /* before, when the option { method: 'copy' } is passed */
.foo {
    overflow-wrap: break-word;
}

/* after */
.foo {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

Installation

npm install --save-dev postcss postcss-replace-overflow-wrap

For Postcss 7 or earlier use Version 3 or earlier:

npm install --save-dev postcss-replace-overflow-wrap@3

Usage

 /* default usage, with no options (method = replace) */
postcss([ require('postcss-replace-overflow-wrap') ])
 /* add word-wrap, but keep overflow-wrap */
postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })

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