diff --git a/stylelint.config.js b/stylelint.config.js index 9247eb3c3..6fee24268 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -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, diff --git a/web_src/css/features/console.css b/web_src/css/features/console.css index 99fb25dae..e2d3327cf 100644 --- a/web_src/css/features/console.css +++ b/web_src/css/features/console.css @@ -5,8 +5,7 @@ color: var(--color-console-fg); font-family: var(--fonts-monospace); border-radius: var(--border-radius); - word-break: break-word; - overflow-wrap: break-word; + overflow-wrap: anywhere; } .console img { max-width: 100%; } diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index cf2e73572..4d12dfaea 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -5,7 +5,6 @@ Gitea's private styles use `g-` prefix. .gt-word-break { word-wrap: break-word !important; - word-break: break-word; /* compat: Safari */ overflow-wrap: anywhere; } diff --git a/web_src/css/repo.css b/web_src/css/repo.css index f02b2b757..7f07e732a 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -410,7 +410,7 @@ td .commit-summary { } .repository.file.list .non-diff-file-content .plain-text pre { - word-break: break-word; + overflow-wrap: anywhere; white-space: pre-wrap; } diff --git a/web_src/css/shared/flex-list.css b/web_src/css/shared/flex-list.css index 6217b4530..0f5477925 100644 --- a/web_src/css/shared/flex-list.css +++ b/web_src/css/shared/flex-list.css @@ -59,7 +59,7 @@ color: var(--color-text); font-size: 16px; font-weight: var(--font-weight-semibold); - word-break: break-word; + overflow-wrap: anywhere; min-width: 0; } @@ -74,7 +74,7 @@ flex-wrap: wrap; gap: .25rem; color: var(--color-text-light-2); - word-break: break-word; + overflow-wrap: anywhere; } .flex-item .flex-item-body a {