User tests: Successful: Unsuccessful:
Pull Request for Issue #32296 .
Added white-space: pre-wrap for pre + code blocks
Run npm
Add some text in a pre or pre + code block in an article.
The pre block doesn't fit in the content, it gets a horizontal scroll bar:
The pre block adapts to the width of the content:
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Templates (site) NPM Change |
hi,
tested this on my site - works perfectly! Thanks
Are you sure this is correct as bootstrap already has classes for this with
word-wrap: break-word;
Yes, I saw this, but that would mean the user needs to put the class in each pre block he/she inserts in an article. That is probably not really handy...
hi,
tested this on my site - works perfectly! Thanks
@jschmi102 You mean you have applied the change and run npm to compile the scss again and tested with success?
If so: Could you mark your test result by going to this PR in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/32322 , then use the "Test this" button, select the right test result and then submit? Thanks in advance, and thanks for testing.
I have tested this item
tested with some of my sample articles
I don't think that this is the right solution for the problem. There are good reasons for <pre>
tags not wrapping text. They are used to display code and other things where you want to have exactly the format you specified in the source. Automatic line breaks would be misleading in many cases.
If a <pre>
tag is wider than the space it may use, it usually gets a vertical scrollbar. This is the case if you look at an article in the "article" view:
The problem that destroys the layout only seems to occur in blog/featured layouts:
IMO, overflow: auto
at the right place might be a better fix. I'm going to have a look where to put that.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-02-06 18:21:22 |
Closed_By | ⇒ | drmenzelit | |
Labels |
Added:
?
NPM Resource Changed
?
|
Are you sure this is correct as bootstrap already has classes for this with
word-wrap: break-word;