fixes layout long titles + text in protostar#8312
fixes layout long titles + text in protostar#8312wilsonge merged 3 commits intojoomla:stagingfrom pe7er:protostar-title-wordwrap
Conversation
There was a problem hiding this comment.
Can we habe a space between tge p and {
|
Sorry, thanks @zero-24 ! |
|
I have tested this item ✅ successfully on a53ea69 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8312. |
|
Thanks for testing @roland-d (at Joomla Pizza Bugs & Fun, Heerenveen, Netherlands) ! |
|
@infograf768 I "think" that @Bakual gave you bad advice but it was based on your incorrect code
Which had the unwanted side effect that was in your PR This PR just has
But I could be talking rubbish |
|
In JMs PR it was pointed out that the title now breaks within a word when it's a title with several words. Which obviously is worse than breaking the line at spaces. |
|
I have tested this item 🔴 unsuccessfully on a53ea69 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8312. |
|
There is indeed a difference between which is used in back-end. as proposed in this patch, which respects spaces AND hyphens when present. Basically, if we have no spaces OR hyphens in the title, This is a screenshot of backend without and now keeping The best solution would evidently be: Alas, Chrome does not respect these... Whatever is chosen, we should imho normalise between back-end and frontend. |
|
I have tested this item ✅ successfully on a53ea69 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8312. |
|
Based on @Bakual comments I am setting this to Needs Review for a maintainer to make a decision This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8312. |
|
I have tested this item ✅ successfully on a53ea69 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8312. |


This PR fixes the layout of long article titles & text articles in the Protostar template. If an article or text has content without spaces or a hyphen - it will continue on the same line, messing up the layout.
btw: I was not intending to use such long titles myself but I can imagine issues with words/sentences in the Thai & Welsh languages.
Testing Procedure
Before the PR
Create a new article
Content > Article > [New]
Use a very long title + article text that has no spaces or hyphens -
Back-end with Isis template looks ok
In the list of Articles the Isis administrator template will nicely break the title onto multiple lines.
Front-end with Protostar template looks weird
However the front-end view of the Protostar template does not break the title and text, and those both mess up the layout.
After the PR
I've added word-wrap: break-word; to h1, h2, h3, h4, h5, h6 and p so that the layout looks better. I've added it to templates/protostar/less/template.less and manually to templates/protostar/css/template.css (however it should be done with compiling instead)