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

Using a Unicode character in CSS `content` breaks roll templates

1628747045

Edited 1628747993
Grinning Gecko
Pro
Sheet Author
I have some code in my character sheet that turns a checkbox into a button. The CSS for it uses: content: "±" As long as that character is in the CSS, Roll Template CSS is never parsed. To be clear, that character and CSS rule have nothing to do with the Roll Template CSS, but for some reason just having that in my character sheet CSS prevents the Roll Template CSS from applying. I found this one-liner&nbsp; <a href="https://app.roll20.net/forum/post/10027878/cse-and-roll-templates/?pageforid=10035839#post-10035839" rel="nofollow">https://app.roll20.net/forum/post/10027878/cse-and-roll-templates/?pageforid=10035839#post-10035839</a> &nbsp;which led me in the right direction, but not before spending hours debugging this problem. And it seems that if I want Roll Template CSS to work, I can't use any Unicode characters in my CSS file. Is this a known issue? Is there a workaround? Any help would be greatly appreciated.
1628765248
Finderski
Pro
Sheet Author
Compendium Curator
It’s known…not sure if it’s considered an issue or not by R20, though. As for workarounds…if it’s for a roll template, you can put the character in your html file in the appropriate place and then use css or roll template helper functions to show/hide the character.&nbsp; Be aware, though, if you put it in your html file without using the appropriate html entity or notation it may prevent the file from loading in the sandbox. The work around fir that is to load the HTML, in the console you should see some sort of error, then load the CSS file (whether changes were made or not) and when that loads, it reloads the HTML, too.&nbsp;
1628781796
Andreas J.
Forum Champion
Sheet Author
Translator
Interesting. I've added this bug/thread to the current list of sheet-related issue: <a href="https://wiki.roll20.net/BCS/Bugs" rel="nofollow">https://wiki.roll20.net/BCS/Bugs</a>
Adding a font import also appears to break the roll template CSS. Exact same issue with @import url(<a href="https://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&amp;display=swap" rel="nofollow">https://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&amp;display=swap</a>);