Long section titles do not wrap in Essential and More themes

Long section titles do not wrap in Essential and More themes

by Carly Born -
Number of replies: 8

We are seeing this issue with our default theme of Essential, but it's also true in More and Academi.  Interestingly, it does NOT appear to be a problem when using Archiaus.

Extremely long section names do not wrap when editing is OFF.  They do wrap when editing is turned ON.  Are others seeing this?

Also, anyone have a fix for Essential?  I just updated to 3.1.0.8 (using Moodle 3.1.1) and that update did not address this issue.


Long Sections Do not Wrap

Average of ratings: -
In reply to Carly Born

Re: Long section titles do not wrap in Essential and More themes

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Carly,

I've raised: https://github.com/gjb2048/moodle-theme_essential/issues/744 - because it was not fixed in 3.1.0.8 because I did not know about it!

The problem also happens in the Clean theme too.  The last version of the Archaius theme was for M3.0 and shows the section title twice and has not been updated for M3.1 and thus probably why it wraps.

Given where the problem is and the way themes work (and Essential in M3.1), this really is a core issue to be raised on the Moodle Tracker.

G

In reply to Gareth J Barnard

Re: Long section titles do not wrap in Essential and More themes

by Carly Born -

Thanks, Gareth.  I didn't mean to imply that your latest release *should* have fixed an issue you weren't aware of!  I mentioned it only to let people know that updating to most recent was not going to fix the issue I identified.

Thanks again!

In reply to Gareth J Barnard

Re: Long section titles do not wrap in Essential and More themes

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Gareth, for what it is worth, I had added the following CSS to MORE awhile ago to fix this problem.  I am not sure if it is still needed, but I thought that I would post it.

/* Fix word wrap and tweak display of collapsed topics headings */

.course-content ul.ctopics li.section .content .toggle a  h3,

.course-content ul.ctopics li.section .content.sectionhidden h3  {

word-wrap: normal;

overflow-wrap: normal;

word-break: normal;

margin: .1em;

width: 102%;

}

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Long section titles do not wrap in Essential and More themes

by Carly Born -

Rick, Thanks for posting this.  I applied this to our Essential theme, but it seems that it's not quite right for this theme.  I'll see if I can figure out how to tweak it, though.

In reply to Carly Born

Re: Long section titles do not wrap in Essential and More themes

by Carly Born -

This is the code that works for me in Essential:


/* Fix word wrap for long section names in course pages */

h3.sectionname  {

white-space:normal!important;

}

In reply to Carly Born

Re: Long section titles do not wrap in Essential and More themes

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks for the information Rick.

I've found that this:

ul.weeks h3.sectionname {
    white-space: normal;
}

works in the Custom CSS.

The long term solution is a core fix.

G

In reply to Gareth J Barnard

Re: Long section titles do not wrap in Essential and More themes

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I've raised MDL-55913 and assigned to myself to get done.  This will be the most effective way as Essential and a lot of my other themes have Bootstrapbase as a parent.

In reply to Gareth J Barnard

Re: Long section titles do not wrap in Essential and More themes

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Sure Gareth, core fixes are better.  And I know that you know this better than most others.

Until then, adding a little CSS seems to be fine.  I don't use Essential (yet), I know it looks great and that you have done remarkable work, so this is why I wasn't sure if my suggested CSS was correct.  However, it seems that it got people pointed in the right direction.