0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-11 02:59:07 +08:00
discourse/app/assets
Régis Hanol 4e332d1688
UX: Allow upload placeholder text to wrap on long translations (#38712)
The upload placeholder label ("Click to upload or drag & drop file")
overflows its container when translated into longer languages like
German.

This happens because the label element has the `.btn` class which sets
`white-space: nowrap` globally. Override it with `white-space: normal`
for the empty upload state so the text wraps naturally within the
placeholder box. Also add padding so wrapped text doesn't touch edges.

**BEFORE**

<img width="392" height="686" alt="2026-03-19 @ 09 26 36"
src="https://github.com/user-attachments/assets/acd0bf8d-af79-4233-abe8-1ab34ecc4b47"
/>

**AFTER**

<img width="403" height="694" alt="2026-03-19 @ 09 26 23"
src="https://github.com/user-attachments/assets/e14ea859-d532-4a22-a50b-50c21902507c"
/>


https://meta.discourse.org/t/398782
2026-03-19 14:18:44 +01:00
..
images FIX: Use correct location for wizard background image (#24183) 2023-10-31 15:57:47 +00:00
stylesheets UX: Allow upload placeholder text to wrap on long translations (#38712) 2026-03-19 14:18:44 +01:00