Hi
As the title say I have a little problem changing the background color.
I implement a theme selector to my project and work perfectly, but today when I open it, the color of the background stop changing
I'm using Sugarcube 2.21 in twine 2
Edit: http://twinery.org/questions/5167/settings-menu-option-to-change-stylesheets?show=5173#a5173 I take the code from there
This is the code in the javascript section
var settingThemeNames = ["(none)", "1", "2", "3", "4"];
var settingThemeHandler = function () {
// cache the jQuery-wrapped <html> element
var $html = $("html");
// remove any existing theme class
$html.removeClass("theme-1 theme-2 theme-3 theme-4");
// switch on the theme name to add the requested theme class
switch (settings.theme) {
case "1":
$html.addClass("theme-1");
break;
case "2":
$html.addClass("theme-2");
break;
case "3":
$html.addClass("theme-3");
break;
case "4":
$html.addClass("theme-4");
break;
}
};
Setting.addList("theme", {
label : "Choose a theme.",
list : settingThemeNames,
onInit : settingThemeHandler,
onChange : settingThemeHandler
});
And this in the CSS section
html.theme-1 body
{
background-color: #3C1642;
}
html.theme-1 .passage
{
color: #005095;
}
html.theme-1 #ui-bar
{
background-color: #462255;
color: #1DD3B0;
}
html.theme-1 .passage a
{
color:#1DD3B0;
}
html.theme-1 .passage a:hover
{
color:#AFFC41;
}
html.theme-1 #ui-dialog-body.saves
{
background-color: #462255;
color: #1DD3B0;
}
html.theme-1 #ui-dialog-body.settings
{
background-color: #462255;
color: #1DD3B0;
}
Someone know why this stop working only on the background?