Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Dark mode works in sandbox, but not from sheet repository

This is slowly driving me nuts and I don't understand why this is the case... If I use the custom sheet sandbox and upload my code, the dark mode works just fine. But the exact same code has been uploaded to the sheet repository and if I use that, the dark mode simply doesn't work. Anything using ".sheet-rolltemplate-darkmode" works, but not "body.sheet-darkmode". How do I figure out what I'm doing wrong and how do I fix it? Also, maybe the custom sheet sandbox should be fixed since it doesn't work the same as when the code comes from the repository.
1686724768

Edited 1686724864
GiGs
Pro
Sheet Author
API Scripter
You shouldn't be using body in your CSS. You should avoid any standard HTML terms. I think they get stripped out or just ignored. I didnt know the custom sandbox worked differently from live. This is useful information to know. Can you thino of any other situations?
Oh, I see... In that case, someone should probably change the wiki, because this is what the wiki said to do . No, I haven't really noticed any other differences.
1686745019

Edited 1686745128
GiGs
Pro
Sheet Author
API Scripter
It#s interesting it does that, and even more interesting that the wiki shows that as an example. See the wiki also saying not to use &lt;body&gt; here: <a href="https://wiki.roll20.net/Building_Character_Sheets#Sheet_Structure" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets#Sheet_Structure</a> Though that might be outdated, it does seem to refer to legacy-only code later. Edit: though I just realised, it probably isn't referring to code the user created, it's referriing to the body that already exists in the Roll20 HTML. As long as you haven't created a body element yourself, it's probably fine.
1686747276
Stephen C.
Pro
Sheet Author
I'll confirm that body.sheet-darkmode can work in CSE sheets. And it seems like you figured out the rolltemplates, so that's good. What character sheet is this?