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 .
×

Help styling roll template

So I have a character sheet roll button that is calling an API script: <button type="roll" name="roll_vigormodroll" class="statroll" value="!modroll @{name} Vigor @{vigormod} @{proficiency}">Roll</button> And the API code successfully emits a roll template directive:     if (msg.content.indexOf("!modroll ") !== -1)     {         let args = msg.content.split(" ");         let character = args[1];         let stat = args[2];         let mod = Number(args[3]);         let prof = Number(args[4]);         let roll = randomInteger(20);         let total1 = roll + mod + prof;         let total2 = roll + mod;                 sendChat(msg.who, "&{template:modroll} {{name=" +              character + "}} {{roll=" +              roll + "}} {{stat=" +              stat + "}} {{mod=" +             mod + "}} {{prof=" +             prof + "}} {{total1=" +             total1 + "}} {{total2=" +             total2 + "}}");     } Which displays the correct template to chat: <rolltemplate class="sheet-rolltemplate-modroll"> <div class="sheet-template-container"> <div class="sheet-template-header">{{name}} {{stat}} Mod Roll</div> <div class="sheet-template-subheader">Proficient: {{total1}}</div> <div class="sheet-template-formula">{{roll}} (roll) + {{mod}} (mod) + {{prof}} (prof)</div> <div class="sheet-template-subheader">Not Proficient: {{total2}}</div> <div class="sheet-template-formula">{{roll}} (roll) + {{mod}} (mod)</div> </div> </rolltemplate> (from chat) Chama Vigor Mod Roll Proficient: 15 12 (roll) + 3 (mod) + 0 (prof) Not Proficient: 15 12 (roll) + 3 (mod) However, the styles of the roll template do not seem to be working: .sheet-template-container { border: 1px solid black } .sheet-template-header { background-color: black; color: white; } .sheet-template-subheader { background-color: purple; color: white; } .sheet-template-formula { background-color: yellow; color: black; } When I inspect the chat text, I don't see any indication that these style directions even exist. I have the feeling that I am putting the CSS for the roll templates in the wrong place? Currently they exist in the CSS portion of the custom character sheet settings. Can anyone help me figure out why my roll template output isn't getting the desired styles? Thanks!
1611613953

Edited 1611614009
Kraynic
Pro
Sheet Author
&nbsp;I think with roll templates, you need both the specific roll template represented in the css label along with specific items being styled within that template.&nbsp; .sheet-rolltemplate-modroll .sheet-template-container { border: 1px solid black } .sheet-rolltemplate-modroll .sheet-template-header { background-color: black; color: white; } .sheet-rolltemplate-modroll .sheet-template-subheader { background-color: purple; color: white; } .sheet-rolltemplate-modroll .sheet-template-formula { background-color: yellow; color: black; } More info on creating roll templates can be found on the wiki: <a href="https://wiki.roll20.net/Building_Character_Sheets/Roll_Templates#Styling_Roll_Templates" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets/Roll_Templates#Styling_Roll_Templates</a>
Kraynic said: &nbsp;I think with roll templates, you need both the specific roll template represented in the css label along with specific items being styled within that template.&nbsp; Ahh, that was exactly the problem. Thanks so much!