Closed joemull closed 1 year ago
Oh and this journal has the material theme set.
Breaking on space only could cause the text to apparat outside the reader block. Iโm not sure which is worse.
Oh, you mean if the text is a URL, it might extend beyond the space visible to the user? Could you break on space if linked text does not contain a protocol like https
, but otherwise break "aggressively"?
I donโt think CSS can differentiate between the two
Huh. But surely this is something others have run into, right? I'm looking at an NYT article that breaks hyperlinked phrases at word breaks and nowhere else. This is not an urgent issue, but surely there's a fix out there?
Do they have an example of a long URL linked in the text? We do in a few places.
Iโm sure we can sort something @joemull ! :)
OK so this seemed to fix it for me for both hyperlinked phrases and long URLs:
Change
.article-body a { word-break: break-all; }
to
.article-body a { word-wrap: break-word; }
๐๐ want to make a PR? ๐
Haha sure let me figure out how to do that!
Recent example of a slightly different issue on Chrome (but not Firefox) in clean theme:
Recent example of a slightly different issue on Chrome (but not Firefox) in clean theme:
This is what Andy had mentioned about long links before:
Do they have an example of a long URL linked in the text? We do in a few places.
And the reason why we need to {word-break: beak-all}
for <a>
tags
Using word-wrap: break-word;
seems to be working for both scenarios using the custom styling plugin, at least for this case:
When we fix this across the board we should test it more carefully on all three themes and multiple browsers.
This was fixed by cd0fd21e173a7659f862eb4287277c9b75a9141a. Tested manually on all themes.
Describe the bug Text inside hyperlinks gets wrapped without regard to word breaks, so there are often bad line breaks in the middle of words.
Janeway version 1.3.10
To Reproduce Steps to reproduce the behavior:
Expected behavior Lines should break on spaces only
Screenshots
Front-end Issues
If the issue is front-end specific please add the following details:
Desktop (please complete the following information):