diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-04 12:48:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 23:48:59 -0500 |
commit | 787a05a3a2db1715aa90517029a364c36403a6b1 (patch) | |
tree | 4977d3f5c87e5e351e90f5a883b98b3f662c5437 /web_src | |
parent | 47bb5f11cb8c6976c14e92e7aa37ebb39a09416b (diff) | |
download | gitea-787a05a3a2db1715aa90517029a364c36403a6b1.tar.gz gitea-787a05a3a2db1715aa90517029a364c36403a6b1.zip |
Fix code wrap for unbroken lines (#23268)
## The Problem
`overflow-wrap: break-word` doesn't work well for unbroken lines. Use
`overflow-wrap: anywhere` instead, and remove legacy alias `word-wrap`
## Before
![image](https://user-images.githubusercontent.com/2114189/222743939-5f38d9e4-18d8-4ae0-8078-4b3a59195a30.png)
## After
![image](https://user-images.githubusercontent.com/2114189/222743833-0e0cfdbb-7b2e-420d-99f9-b1b45dde521a.png)
---------
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/less/_base.less | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index a73dae6bf3..1cf65e784c 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -2121,8 +2121,7 @@ a.ui.label:hover { font: 12px var(--fonts-monospace); white-space: pre-wrap; word-break: break-all; - overflow-wrap: break-word; - word-wrap: break-word; + overflow-wrap: anywhere; } .blame .code-inner { |