I've been working on a dark theme for the website lately, and I was hoping to change the display for the spoiler tags, so the text would be more visible, on the new background I've been using. The problem I'm having right now is since the theme works with CSS, and the onclick spoiler tags seem to function off of javascript, I can't change the background on the text to match the actual text, without effectively ruining the onclick effect.
Code:
<span class="spoiler" style="color: black; cursor: pointer; background: none repeat scroll 0% 0% black;" onclick="if (this.style.backgroundColor != '') {this.style.background = '';} else {this.style.background = 'black';}"></span>
What I would like to do is to turn the text white, however doing so makes it show up through the spoiler because the code restricts it to black instead of matching it with the default text color determined by CSS. I can make the whole thing work if I used :hover properties, but I would rather keep the spoilers onclick, and was hoping there was a way to get the javascript changed so that myself and anyone else that would like to work on a color theme for the sight would have the ability to work with the spoiler tags a little easier.