.wrap in index.css has incorrect word-break #5149

Closed
opened 2025-11-02 06:15:59 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @nergdron on GitHub (Mar 30, 2020).

  • Gitea version (or commit ref): docker image (f0a8199e7e95)

Description

the .wrap CSS property in index.css (in both themes) has the styles:

word-wrap: break-word;
    overflow-wrap: break-word;
word-break: break-all;

the first two are fine, but the last causes things to break mid word, impeding readability. word-break: break-all; should be removed so it defaults to normal, which has much more reasonable behaviour.

Screenshots

gitea-default
gitea-green

Originally created by @nergdron on GitHub (Mar 30, 2020). - Gitea version (or commit ref): docker image (f0a8199e7e95) ## Description the `.wrap` CSS property in `index.css` (in both themes) has the styles: ``` word-wrap: break-word; overflow-wrap: break-word; word-break: break-all; ``` the first two are fine, but the last causes things to break mid word, impeding readability. `word-break: break-all;` should be removed so it defaults to `normal`, which has much more reasonable behaviour. ## Screenshots ![gitea-default](https://user-images.githubusercontent.com/292681/77886128-28105b00-721d-11ea-8ae7-e32c2253db7a.png) ![gitea-green](https://user-images.githubusercontent.com/292681/77886148-2f376900-721d-11ea-928f-b4c342e1cebc.png)
GiteaMirror added the issue/confirmedtopic/ui labels 2025-11-02 06:15:59 -06:00
Author
Owner

@silverwind commented on GitHub (Mar 30, 2020):

Yes it can be removed as overflow-wrap: break-word; should still suffice to break long works without whitespace in them.

@silverwind commented on GitHub (Mar 30, 2020): Yes it can be removed as `overflow-wrap: break-word;` should still suffice to break long works without whitespace in them.
Author
Owner

@silverwind commented on GitHub (Apr 3, 2020):

Correction: overflow-wrap: break-word is not enough to break sequences without any whitespace, e.g. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa will not be broken so word-break: break-all is needed to ensure all strings are broken up which is important to prevent layout issues with overflown strings.

I think this issue is invalid.

@silverwind commented on GitHub (Apr 3, 2020): Correction: `overflow-wrap: break-word` is not enough to break sequences without any whitespace, e.g. `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` will not be broken so `word-break: break-all` is needed to ensure all strings are broken up which is important to prevent layout issues with overflown strings. I think this issue is invalid.
Author
Owner

@zeripath commented on GitHub (Apr 3, 2020):

Would hyphens: auto; help?

@zeripath commented on GitHub (Apr 3, 2020): Would `hyphens: auto;` help?
Author
Owner

@silverwind commented on GitHub (Apr 3, 2020):

hyphens sucks imho, it introduces additional content and not all languages use hyphenization.

@silverwind commented on GitHub (Apr 3, 2020): `hyphens` sucks imho, it introduces additional content and not all languages use hyphenization.
Author
Owner

@silverwind commented on GitHub (Apr 3, 2020):

Maybe overflow-wrap alone is actually worth a try. I can't reproduce the scenario of a uninterrupted string not breaking with it:

https://jsfiddle.net/silverwind/tzg8a6qv/

@silverwind commented on GitHub (Apr 3, 2020): Maybe `overflow-wrap` alone is actually worth a try. I can't reproduce the scenario of a uninterrupted string not breaking with it: https://jsfiddle.net/silverwind/tzg8a6qv/
Author
Owner

@stale[bot] commented on GitHub (Jun 2, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 2, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Jun 17, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Jun 17, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@wxiaoguang commented on GitHub (Apr 25, 2023):

There is no.wrap in CSS anymore

@wxiaoguang commented on GitHub (Apr 25, 2023): There is no`.wrap` in CSS anymore
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5149