1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-02 16:35:19 +02:00

Forbid deprecated break-word in CSS (#30934)

Forbid
[deprecated](https://drafts.csswg.org/css-text-3/#word-break-property)
`break-word` and fix all occurences.

Regarding `overflow-wrap: break-word` vs `overflow-wrap: anywhere`:

Example of difference: https://jsfiddle.net/silverwind/1va6972r/

[Here](https://stackoverflow.com/questions/77651244) it says:

> The differences between normal, break-word and anywhere are only clear
if you are using width: min-content on the element containing the text,
and you also set a max-width. A pretty rare scenario.

I don't think this difference will make any practical impact as we are
not hitting this rare scenario.

(cherry picked from commit 5556782ebeb1ca4d17e2fff434b11651887b9899)
This commit is contained in:
silverwind 2024-05-10 14:25:49 +02:00 committed by Earl Warren
parent 38ea77ebbe
commit 51f6c3a059
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 5 additions and 7 deletions

View file

@ -150,7 +150,7 @@ export default {
'declaration-property-unit-allowed-list': null,
'declaration-property-unit-disallowed-list': {'line-height': ['em']},
'declaration-property-value-allowed-list': null,
'declaration-property-value-disallowed-list': null,
'declaration-property-value-disallowed-list': {'word-break': ['break-word']},
'declaration-property-value-no-unknown': true,
'font-family-name-quotes': 'always-where-recommended',
'font-family-no-duplicate-names': true,