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 sheet: css not showing in roll template

Here's the code to test the issue: HTML: <script type="text/worker"> on ("clicked:roll_hi", rollHi); function rollHi()     {     startRoll("&{template:hi-roll} {{title=Something.}} {{roll1=[[1d30]]}}", rollCallback);     } function rollCallback(result)     {     finishRoll(result["rollId"]);     } </script> <rolltemplate class="sheet-rolltemplate-hi-roll">     <div class="sheet-template-container sheet-hi-roll-label">         {{title}}{{roll1}}     </div> </rolltemplate> <button type="action" name="act_roll_hi">Roll!</button> CSS: .sheet-hi-roll-label     {     color: #80AAFF;     } The text of the roll message appears black in the chat window. In the inspector it shows that the classes appear in the div the same as they appear in my HTML. It doesn't work if I nest a second <div> and doesn't work if I try to modify the style of <h4> and use that around my text. Any more ideas?
1702956231
GiGs
Pro
Sheet Author
API Scripter
Is there a reason you are using a custom roll parsing solution? You could do this with a roll button. <button type="roll" name="roll_hi" value="&{template:hi-roll} {{title=Something.}} {{roll1=[[1d30]]}}">Roll!</button> That would eliminate the need for the entire script block. On to your actual problem. Are you saying that the color assigned is black instead of the color you are trying to assign? I wonder if something buggy is going on with the action button name: "act_roll_hi" - can you change it to somethign that doesn't contain roll_ , and see if it works properly.
I'm doing it that way because the actual character sheet I'm working on is pulling in a bunch of data and creating the string fed in to the custom roll thing. I don't think black is assigned, rather it's just the default font color. If I change anything else in the css it also doesn't affect the font. I actually did try removing "roll" from the name and it did nothing.
1702963658

Edited 1702963714
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The problem is you are missing the roll template css prepend that is required (.sheet-rolltemplate-hi-roll) before your actual css rule.
Thank you, that worked. Nowhere to be found in the documentation though. The closest thing was a mention that the "sheet-" prefix had to be included which is why I did that. I'm going to go bang my head into a wall now. Thank you again.
1702997366
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It's in the wiki.