Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

add overflow-wrap fallback #280

Merged
merged 1 commit into from
Jun 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/content/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,20 @@ a::before {
|
[Plugin documentation](https://github.com/axa-ch/postcss-pseudoelements)

## `overflow-wrap` property (`word-wrap` fallback)

Converts `overflow-wrap` to `word-wrap` (many browser support only the old [word-wrap](http://caniuse.com/#feat=wordwrap) property).

```css
body {
overflow-wrap: break-word;
}
```

[Specification](https://drafts.csswg.org/css-text-3/#propdef-word-wrap)
|
[Plugin documentation](https://github.com/MattDiMu/postcss-replace-overflow-wrap)

## @todo

Any omissions of the CSS specifications (even in draft) that are subject to be
Expand Down
6 changes: 6 additions & 0 deletions docs/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ title: cssnext - Use tomorrow’s CSS syntax, today.
(<code>:</code> fallback)
</small>
</li>
<li class="r-Grid-cell r-minS--1of2">
<a href="/features/#replace-overflow-wrap"><code>overflow-wrap</code> property</a>
<small class="cssnext-FeaturesList-small">
(<code>word-wrap</code> fallback)
</small>
</li>
</ul>
<small
class="cssnext-FeaturesList-small"
Expand Down
5 changes: 5 additions & 0 deletions docs/content/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
}
.sepia {
filter: sepia(.8);
}

/* overflow-wrap fallback */
body {
overflow-wrap: break-word;
}

</textarea>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"postcss-nesting": "^2.0.5",
"postcss-pseudo-class-any-link": "^1.0.0",
"postcss-pseudoelements": "^3.0.0",
"postcss-replace-overflow-wrap": "^1.0.0",
"postcss-selector-matches": "^2.0.0",
"postcss-selector-not": "^2.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/fixtures/features/replace-overflow-wrap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
overflow-wrap: break-word;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
word-wrap: break-word;
}
3 changes: 3 additions & 0 deletions src/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export default {
// https://npmjs.com/package/postcss-color-rgba-fallback
colorRgba: (options) => require("postcss-color-rgba-fallback")(options),

// https://www.npmjs.com/package/postcss-replace-overflow-wrap
replaceOverflowWrap: (options) => require("postcss-replace-overflow-wrap")(options),

// https://npmjs.com/package/autoprefixer
autoprefixer: (options) => require("autoprefixer")(options),
}