Remove or Replace css break-all in small areas #13290

Closed
opened 2025-11-02 10:37:33 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Simandara on GitHub (Jul 15, 2024).

Description

Hello!

On the sidebar of an issue, the Milestones (and Projects) section can be long enough to fit on multiples lines:
Capture d’écran 2024-07-15 à 16 16 06

However, the text is wrapped immediately, due to the word-break: break-all; property. I suggest to set it to a more gentle break like word-break: break-word; or just use the default behaviour:
Capture d’écran 2024-07-15 à 16 16 48

We could also rely on the text-overflow: ellipsis; CSS rule to truncate the text and leave it on 1 line, though it's a little more tricky to implement it with the flexbox.
Capture d’écran 2024-07-15 à 16 25 21

What do you think?

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker latest from DockerHub

Database

SQLite

Originally created by @Simandara on GitHub (Jul 15, 2024). ### Description Hello! On the sidebar of an issue, the Milestones (and Projects) section can be long enough to fit on multiples lines: ![Capture d’écran 2024-07-15 à 16 16 06](https://github.com/user-attachments/assets/e9a62536-e3d6-4611-be0f-28322599cdbe) However, the text is wrapped immediately, due to the `word-break: break-all;` property. I suggest to set it to a more gentle break like `word-break: break-word;` or just use the default behaviour: ![Capture d’écran 2024-07-15 à 16 16 48](https://github.com/user-attachments/assets/4435e5c5-2de9-4cbe-b62e-15ce6c4f8d73) We could also rely on the `text-overflow: ellipsis;` CSS rule to truncate the text and leave it on 1 line, though it's a little more tricky to implement it with the flexbox. ![Capture d’écran 2024-07-15 à 16 25 21](https://github.com/user-attachments/assets/d9e0fd78-6289-4338-83ae-15ab3a04f050) What do you think? ### Gitea Version 1.22.0 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Docker latest from DockerHub ### Database SQLite
GiteaMirror added the type/bugtopic/ui labels 2025-11-02 10:37:33 -06:00
Author
Owner

@silverwind commented on GitHub (Jul 15, 2024):

Should likely use overflow-wrap: anywhere instead of word-break: break-all there because the former does not break inside words unless it absolutely has to.

@silverwind commented on GitHub (Jul 15, 2024): Should likely use `overflow-wrap: anywhere` instead of `word-break: break-all` there because the former does not break inside words unless it absolutely has to.
Author
Owner

@silverwind commented on GitHub (Jul 15, 2024):

https://github.com/go-gitea/gitea/pull/31637

@silverwind commented on GitHub (Jul 15, 2024): https://github.com/go-gitea/gitea/pull/31637
Author
Owner

@Simandara commented on GitHub (Jul 15, 2024):

Organisations descriptions have that break anywhere as well:

Capture d’écran 2024-07-15 à 20 57 34

tested on both my instance 1.22 and on 1.23.0+dev-322-g0bb4c1cde2

@Simandara commented on GitHub (Jul 15, 2024): Organisations descriptions have that break anywhere as well: ![Capture d’écran 2024-07-15 à 20 57 34](https://github.com/user-attachments/assets/ee0d4262-0305-4c9f-8a9a-91025860f20c) tested on both my instance 1.22 and on 1.23.0+dev-322-g0bb4c1cde2
Author
Owner

@Simandara commented on GitHub (Jul 15, 2024):

Toying with the devtools:

.page-content.organization #org-info {
  /*! overflow-wrap:anywhere; */
  flex:1;
  /*! word-break:break-all; */
}

Capture d’écran 2024-07-15 à 21 02 35

that fix the issues by letting the .markup overrules #org-info.

@Simandara commented on GitHub (Jul 15, 2024): Toying with the devtools: ```css .page-content.organization #org-info { /*! overflow-wrap:anywhere; */ flex:1; /*! word-break:break-all; */ } ``` ![Capture d’écran 2024-07-15 à 21 02 35](https://github.com/user-attachments/assets/ba7bf0c0-2d93-4d59-a5b1-c3410307c9b7) that fix the issues by letting the `.markup` overrules `#org-info`.
Author
Owner

@silverwind commented on GitHub (Jul 15, 2024):

I handled org description in https://github.com/go-gitea/gitea/pull/31637 as well. Not sure about overflow-wrap cases. All remaining cases of break-all are code rendering and there is it welcome I guess.

@silverwind commented on GitHub (Jul 15, 2024): I handled org description in https://github.com/go-gitea/gitea/pull/31637 as well. Not sure about overflow-wrap cases. All remaining cases of `break-all` are code rendering and there is it welcome I guess.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13290