? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar drmenzelit
drmenzelit
5 Feb 2021

Pull Request for Issue #32296 .

Summary of Changes

Added white-space: pre-wrap for pre + code blocks

Testing Instructions

Run npm

Add some text in a pre or pre + code block in an article.

Actual result BEFORE applying this Pull Request

The pre block doesn't fit in the content, it gets a horizontal scroll bar:

grafik

Expected result AFTER applying this Pull Request

The pre block adapts to the width of the content:

grafik

avatar drmenzelit drmenzelit - open - 5 Feb 2021
avatar drmenzelit drmenzelit - change - 5 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2021
Category Front End Templates (site) NPM Change
avatar brianteeman
brianteeman - comment - 5 Feb 2021

Are you sure this is correct as bootstrap already has classes for this with word-wrap: break-word;

avatar jschmi102
jschmi102 - comment - 5 Feb 2021

hi,
tested this on my site - works perfectly! Thanks

avatar drmenzelit
drmenzelit - comment - 5 Feb 2021

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...

avatar richard67
richard67 - comment - 6 Feb 2021

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.

avatar jschmi102 jschmi102 - test_item - 6 Feb 2021 - Tested successfully
avatar jschmi102
jschmi102 - comment - 6 Feb 2021

I have tested this item successfully on f9a39a6

tested with some of my sample articles


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32322.
Applied change directly to template.css (template.min.css) of cassiopeia.

avatar Harmageddon
Harmageddon - comment - 6 Feb 2021

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:

Screenshot_2021-02-06 Testing Home

The problem that destroys the layout only seems to occur in blog/featured layouts:
Screenshot_2021-02-06 Home

IMO, overflow: auto at the right place might be a better fix. I'm going to have a look where to put that.

avatar Harmageddon
Harmageddon - comment - 6 Feb 2021

Proposing #32335 as an alternative.

avatar drmenzelit
drmenzelit - comment - 6 Feb 2021

Closing this in favour of #32335

avatar drmenzelit drmenzelit - close - 6 Feb 2021
avatar drmenzelit drmenzelit - change - 6 Feb 2021
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 ?

Add a Comment

Login with GitHub to post a comment