Overwrite dimmed in Raw SCSS not working

Overwrite dimmed in Raw SCSS not working

by Aaron Johnson -
Number of replies: 3

Hi,

I'm using the Boost theme (2016120500) in Moodle 3.2.2. I tried changing the color of dimmed links by adding the following code to the Raw SCSS in the Boost theme advanced settings page:

a.dimmed,
a.dimmed:link,
a.dimmed:visited,
a.dimmed_text,
a.dimmed_text:link,
a.dimmed_text:visited,
.dimmed_text,
.dimmed_text a,
.dimmed_text a:link,
.dimmed_text a:visited,
.usersuspended,
.usersuspended a,
.usersuspended a:link,
.usersuspended a:visited,
.dimmed_category,
.dimmed_category a {
    color: #EC7405;
}

It didn't do anything. I then went into the file moodle\theme\boost\scss\moodle\core.scss and found that code block (lines 61-78). There I replaced "@extend .text-muted;" with "color: #EC7405;" and it worked.

Any ideas why the SCSS override from the Moodle Admin site didn't work? It would be better to change it there, right?

Thanks,
Aaron

Average of ratings: -
In reply to Aaron Johnson

Re: Overwrite dimmed in Raw SCSS not working

by Rajnish Rao -

Hi Aaron,

If you inspect source code, you will see that CSS written in Boost theme comes with "!important" and that's why your CSS is not  overriding the previous one.


Just add as following:

a.dimmed,
a.dimmed:link,
a.dimmed:visited,
a.dimmed_text,
a.dimmed_text:link,
a.dimmed_text:visited,
.dimmed_text,
.dimmed_text a,
.dimmed_text a:link,
.dimmed_text a:visited,
.usersuspended,
.usersuspended a,
.usersuspended a:link,
.usersuspended a:visited,
.dimmed_category,
.dimmed_category a {
    color: #EC7405 !important; 
}


Best,
Rajnish



Average of ratings: Useful (5)
In reply to Rajnish Rao

Re: Overwrite dimmed in Raw SCSS not working

by Aaron Johnson -

Thanks Rajnish, that did it.

Aaron

Average of ratings: Useful (1)
In reply to Aaron Johnson

Re: Overwrite dimmed in Raw SCSS not working

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

iT'S EASY WHEN YOU KNOW HOW!

Cheers

Mary