Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: spiros on December 19, 2019, 08:37:26 AM

Title: Unsetting/Modifying a bbc_color class
Post by: spiros on December 19, 2019, 08:37:26 AM
Unsetting/Modifying a bbc_color class

I am experimenting with the SunRise (https://www.simplemachines.org/community/index.php?topic=562339.0) theme that has a dark mode option.

Is it possible for already existing bbc_color marked text, to have a different colour, or unset its colour when switching to dark mode? For example, when entering this on SMF:

[color=navy]Test[/color]

the output is

<span style="color: navy;" class="bbc_color">Test</span>

Can any color: navy instances have a different colour output in dark mode?
Title: Re: Unsetting/Modifying a bbc_color class
Post by: Illori on December 19, 2019, 07:38:31 PM
as long as your theme has a different css for the dark mode you could add something like this to the end of the file.

span[style*="color: blue"] { color: #bcbcbc !important;}
span[style*="color: navy"] { color: #bcbcbc !important;}
span[style*="color: black"] { color: #bcbcbc !important;}
span[style*="color: #000000"] { color: #bcbcbc !important;}
span[style*="color: #0000ff"] { color: #bcbcbc !important;}


that should do the trick, just need to modify it for which color you are looking for and which color to change it to.
Title: Re: Unsetting/Modifying a bbc_color class
Post by: spiros on December 20, 2019, 01:59:41 AM
Wow, magic!