Skip to content

Commit

Permalink
Fix code wrap for unbroken lines (go-gitea#23268)
Browse files Browse the repository at this point in the history
## 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>
  • Loading branch information
2 people authored and GiteaBot committed Mar 4, 2023
1 parent 464bbd7 commit bf6b10d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web_src/less/_base.less
Expand Up @@ -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 {
Expand Down

0 comments on commit bf6b10d

Please sign in to comment.