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

Custom Checkbox CSS not Rendering Correctly

1613153944

Edited 1613153967
I am attempting to do something that is very simple with normal CSS, but for some reason, Roll20 is having none of it. I am trying to make a simple rollup/rolldown checkbox. It works when I do not specify a class, but I don't want to affect every checkbox on the sheet to be affected this way. I'm attempting to contain the box in the class arrow  and the span which will produce the checkbox overlay in class atext . I've also tried attaching ".charsheet" to the beginning of the CSS classes, but that hasn't worked either. CSS input.arrow { opacity: 0; width: 16px; height: 16px; position: relative; top: 5px; left: 6px; margin: -10px; cursor: pointer; z-index: 1; } input.arrow + span.atext::before { margin-right: 4px; line-height: 14px; text-align: center; display: inline-block; vertical-align: middle; content: "▼"; width: 14px; height: 14px; font-size: 12px; } input.arrow:checked + span.atext::before { content: "►"; } HTML <input type="checkbox" class="arrow" /><span class='atext'></span> Any help that can be given into the irregular coding environment of Roll20 would be greatly appreciated!
1613154381
GiGs
Pro
Sheet Author
API Scripter
In CSS, roll20 prepends every class name with sheet-  if it's not there already. So this input.arrow should be input.sheet-arrow Likewise for your other class name: atext should be sheet-atext in the CSS file.
Maddening! Thank you so much! Is there anything else that may be a common pitfall I should watch out for when taking my traditional formatting for granted? While looking for a solution, I came across this page right before you answered, which mentioned the sheet-  prompt;  Building_Character_Sheets#Common_Mistakes . I've been rolling through the forums so much for random solutions, I feel like I need a 4th monitor!
1613155919
Andreas J.
Forum Champion
Sheet Author
Translator
Yeah, that wiki page is the Alpha and Omega of Custom Sheet Creation.