Skip to content

i18n: adding "word-break: keep-all" to .mx_AccessibleButton #21287

Closed
matrix-org/matrix-react-sdk
#8212
@luixxiul

Description

@luixxiul

Steps to reproduce

  1. Change Element language setting to Japanese (or Chinese/Korean)
  2. Open a Space's setting
  3. Check the string next to the profile picture to upload it.

Outcome

What did you expect?

The anchor link text should not be collapsed/broken. Here アップロード means Upload.

after

If text inside buttons with should not be collapsed in general, the button .mx_AccessibleButton should have word-break: keep-all.

https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#values

keep-all

Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.

Replacing min-width: min-content of the button with min-width: fit-content should work as well.

What happened instead?

The text are collapsed per a couple of characters and ugly.

before

Here is another example, a link button to expand the collapsed messages on a room history.

Without word-break: keep-all:

before

With word-break: keep-all:

after

(展開 means expand here)

Operating system

No response

Browser information

No response

URL for webapp

localhost

Application version

develop branch

Homeserver

No response

Will you send logs?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceS-MinorImpairs non-critical functionality or suitable workarounds existT-DefectX-Needs-Design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions