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

[Looking for help] Inconsistent CSS issue - Custom Character Sheet

I'm a dev working on custom character sheets for the Adventures on a Dime system, and I have a weird issue-- CSS is working in Character Sheet Template Preview but not the custom sheet editor or in the game itself. There are a couple of things I need the CSS and JS working to test/set up, but I can't check my work because of the difference.  Character Sheet editor the CSS has .sheet before each element declaration and afaik even if I'd messed that up it wouldn't remove all styling. The JS works fine on the sheet, but it doesn't look like the CSS is showing up. I'm more familiar with working with and troubleshooting sites, so I'm not sure where to start here or what I should be looking up, because it seems like the CSS should be consistent.
1632157783

Edited 1632157928
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Jestershark, There's a few things going on here (or probably going on). First, the red text indicates that you haven't added a translation json file or your translation JSON file isn't valid JSON. As for the CSS itself, it sounds like you are coding CSS for the legacy sanitization system, but may not have checked that option in the custom sheet dialog.  The legacy sanitizer adds sheet- to all classes you declare for your html elements and doesn't allow some more advanced css features like animations. The new sanitizer takes place inside an iframe and so allows pretty much everything about CSS with a few exceptions caused by roll templates which are still using the legacy sanitizer regardless of what the sheet itself uses. And, not really related, but I'd really recommend using a code editor on your computer with the custom sheet sandbox instead of the custom sheet editor. The workflow is much more streamlined and does not require waiting for the code to save and refreshing the game. EDIT: And a final note. The character sheet preview in the custom sheet editor is pretty much useless and shouldn't be relied on. It also always shows the sheet with legacy sanitization on regardless of whether you have legacy sanitization enabled or not.
1632178878
Andreas J.
Forum Champion
Sheet Author
Translator
EDIT: And a final note. The character sheet preview in the custom sheet editor is pretty much useless and shouldn't be relied on. It also always shows the sheet with legacy sanitization on regardless of whether you have legacy sanitization enabled or not. A.k.a. <a href="https://wiki.roll20.net/Sheet_Mistakes#2" rel="nofollow">https://wiki.roll20.net/Sheet_Mistakes#2</a> jestershark, I really recommend you go through the above checklist, along with reading more of the Building Character Sheets documentation. It seems you're encountering many of the common pitfalls already, so there is a good chance there are other things you've missed, which the wiki likely covers.