MDL-60020 | Missing custom CSS classes (HTML Block) in Boost?

Re: Missing custom CSS classes (HTML Block) in Boost?

by Richard Clay -
Number of replies: 8

Hi Mary / Anthony

I've just hit this problem too and can explain a bit more. The problem occurs when you add a custom CSS class via the configure block page (see below). The class is not applied when the main course page is rendered. The Chrome web inspector confirms this.


Block exmaple


Could be a bug.


Thanks
Richard

Average of ratings: Useful (1)
In reply to Richard Clay

Re: Missing custom CSS classes (HTML Block) in Boost?

by Anthony Rimmer -

Hi Richard, 

Thanks for taking this further, I think your screenshot helps illustrate the issue.

I can confirm this is exactly what I am experiencing.

Anthony

In reply to Anthony Rimmer

Re: Missing custom CSS classes (HTML Block) in Boost?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

I see what you mean.

Can you clarify that this ONLY happens in Boost theme and not Clean or More theme. If so then it is a Boosl theme problem. If not then it is a Block problem and I will move this discussion into the Blocks forum.

I will await your answer...thanks

PS: Can you also tell me the version of Moodle you are discussing?

Mary

In reply to Richard Clay

Re: Missing custom CSS classes (HTML Block) in Boost?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Anthony,

I have just tested this ins a brand new Moodle 3.2 set up on my test server and found that what you are saying is not true. Either I am reading this wrong or I am doing something wrong?

Having already added the HTML block to the Frontpage and enabled the Custom CSS Classes. I added some content and included within that content one of the class selectors I had added to the block.

I created a course and then configured the HTML block to be seen in every page.

I went to the course page and checked to see if the HTML block was on the page, which it was. I then examined the content to see if the list of classes at the bottom of the content settings page was there and it was. I also checked using Web Dev tools and found the class that I had added was there in the soure code too.

So what part am I missing in all of this?

Mary

In reply to Mary Evans

Re: Missing custom CSS classes (HTML Block) in Boost?

by Richard Clay -

Hi Mary

Please see the video below which highlights the problem. I'm testing using  3.2.2+ (Build: 20170316).


Cheers Richard
In reply to Richard Clay

Re: Missing custom CSS classes (HTML Block) in Boost?

by A W -

Mary,

Can you confirm the CSS classes are added to the block's default class? Can you send a screenshot?

This isn't working for me either.

Thanks,

Alex

In reply to A W

Re: Missing custom CSS classes (HTML Block) in Boost?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
What exactly do you mean by "blocks default class"?
In reply to Mary Evans

Re: Missing custom CSS classes (HTML Block) in Boost?

by A W -

Thanks Mary,

On the Additional CSS Classes help "?" it says "Any CSS classes entered here (space delimited) will be appended to the blocks default class" which I take to mean the top level of the block itself, which seems to be borne out by Rich's video showing how the class is added on non Boost themes.

Thanks for raising the bug, we'll see what happens with it smile



In reply to A W

Re: Missing custom CSS classes (HTML Block) in Boost?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ah...thank AW now I understand. Also thank you for posting that image as I could not read the video, me being partially sighted has its downfall unfortunately.

With a bit if luck I may be able to fix the problem.

Cheers

Mary