Skip to content

Commit e02d323

Browse files
serkodevRobinMalfait
authored andcommitted
Use @supports not for break-anywhere polyfill
1 parent fa5f6a0 commit e02d323

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/corePlugins.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1539,10 +1539,11 @@ export let corePlugins = {
15391539
'.break-all': { 'word-break': 'break-all' },
15401540
'.break-keep': { 'word-break': 'keep-all' },
15411541
'.break-anywhere': {
1542-
'word-break': 'break-word',
15431542
'@supports (overflow-wrap: anywhere)': {
15441543
'overflow-wrap': 'anywhere',
1545-
'word-break': 'normal',
1544+
},
1545+
'@supports not (overflow-wrap: anywhere)': {
1546+
'word-break': 'break-word',
15461547
},
15471548
},
15481549
})

tests/plugins/__snapshots__/wordBreak.test.js.snap

+6-5
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ exports[`should test the 'wordBreak' plugin 1`] = `
1919
word-break: keep-all;
2020
}
2121
22-
.break-anywhere {
23-
word-break: break-word;
24-
}
25-
2622
@supports (overflow-wrap: anywhere) {
2723
.break-anywhere {
2824
overflow-wrap: anywhere;
29-
word-break: normal;
25+
}
26+
}
27+
28+
@supports not (overflow-wrap: anywhere) {
29+
.break-anywhere {
30+
word-break: break-word;
3031
}
3132
}
3233
"

0 commit comments

Comments
 (0)