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

problem with rolltemplate css

1655622662
Matthew C
Pro
Sheet Author
So...one day my css was working and then it wasn't, I cannot seem to find a change to the rules anywhere so I am not sure why it is not working, I am posting a simple rolltemplate and my ENTIRE css (reason is because it may be broken somewhere stupid that I am just not seeing) < rolltemplate class = "sheet-rolltemplate-blank" >     < div class= "sheet-template-container" >         < div class= "sheet-template-header" > {{ name }} </ div >         {{ #rollTotal () type 1 }}         < div class= "sheet-template-row-outcome" > Result: {{ computed :: result }} vs Target {{ target }}             {{ #rollTotal () computed :: outcome 1 }}             < span class= "sheet-underwhelming" style= "color:seagreen" > Success </ span >             {{ /rollTotal () computed::outcome 1 }}             {{ #rollTotal () computed :: outcome 2 }}             < span class= "sheet-underwhelming" style= "color:firebrick" > Failure </ span >             {{ /rollTotal () computed::outcome 2 }}         </ div >         {{ /rollTotal () type 1 }}         {{ #rollTotal () type 2 }}         < div class= "sheet-template-row-outcome" > Die Rolls: {{ roll1 }} {{ roll2 }} {{ roll3 }} {{ roll4 }} </ div >     </ div >     < div class= "sheet-template-container" style= "margin-top:0px" >         < div class= "sheet-template-header" > Results </ div >         < div class= "sheet-template-row-outcome" style= "padding-bottom:1px" >             {{ #rollTotal () computed :: result 0 }}             < span class= "sheet-underwhelming" style= "color:firebrick" > No Chance Success </ span >             {{ /rollTotal () computed::result 0 }}             {{ #rollTotal () computed :: result 1 }}             < span class= "sheet-underwhelming" style= "color:seagreen" > High Chance </ span >             {{ /rollTotal () computed::result 1 }}             {{ #rollTotal () computed :: result 2 }}             < span class= "sheet-underwhelming" style= "color:seagreen" > High Chance & Average Chance </ span >             {{ /rollTotal () computed::result 2 }}             {{ #rollTotal () computed :: result 3 }}             < span class= "sheet-underwhelming" style= "color:seagreen" > High Chance, Average Chance & Low Chance </ span >             {{ /rollTotal () computed::result 3 }}             {{ #rollTotal () computed :: result 4 }}             < span class= "sheet-underwhelming" style= "color:seagreen" > Full Chance Success </ span >             {{ /rollTotal () computed::result 4 }}         </ div >         {{ /rollTotal () type 2 }}     </ div > </ rolltemplate > on ( 'clicked:blank' , ( info ) => {         let roll = "&{template:empty} {{type=[[?{Blank or Chance Roll?|Blank,1|Chance,2}]]}}" ;         startRoll ( roll , ( results ) => {             let endroll = "" ;             let typeresult = results . results . type . result ;             if ( typeresult === 1 ) endroll = "&{template:blank} {{name=@{character_name}'s Blank Roll}} " +                 "{{type=[[1]]}} {{roll1=[[1d10]]}} {{roll2=[[1d10]]}} {{roll3=[[1d10]]}} {{roll4=[[1d10]]}} {{target=[[?{Target Value?|0}]]}} {{outcome=[[0]]}} {{result=[[0]]}} {{bonus=[[?{Roll Modifier|0}]]}}" ;             if ( typeresult === 2 ) endroll = "&{template:blank} {{name=@{character_name}'s Chance Roll}} " +                 "{{type=[[2]]}} {{roll1=[[1d10]]}} {{roll2=[[1d10]]}} {{roll3=[[1d10]]}} {{roll4=[[1d10]]}} {{result=[[0]]}} {{outcome=[[0]]}} {{target=[[0]]}} {{bonus=[[0]]}}" ;             let result = 0 ;             console . log ( typeresult );             startRoll ( endroll , ( results ) => {                 console . log ( results . results . roll1 . result );                 console . log ( results . results . roll2 . result );                 console . log ( results . results . roll3 . result );                 console . log ( results . results . roll4 . result );                 if ( typeresult === 1 ) result = results . results . roll1 . result + results . results . bonus . result ;                 if ( typeresult === 2 ) {                     result += results . results . roll1 . result % 2 == 0 ? 1 : 0 ;                     result += results . results . roll2 . result % 2 == 0 ? 1 : 0 ;                     result += results . results . roll3 . result % 2 == 0 ? 1 : 0 ;                     result += results . results . roll4 . result % 2 == 0 ? 1 : 0 ;                 };                 console . log ( result );                 finishRoll (                     results . rollId , {                     result: result ,                     outcome: ( results . results . roll1 . result + results . results . bonus . result ) > results . results . target . result ? 1 : 0                 }                 );             });             finishRoll ( results . rollId );         });     });
1655623629

Edited 1655626630
Matthew C
Pro
Sheet Author
link to css Sorry, it wont let me post it in code, my guess, it is just way too freaking much (I still need to beautify and make concise)
1655628064

Edited 1655629797
Andreas J.
Forum Champion
Sheet Author
Translator
Yeah this keeps happening for some reason, but I never remember exactly what the conditions where that resulted in the rolltemplate throwing out the css. look at the related threads under <a href="https://wiki.roll20.net/Character_Sheet_Development/Bugs_%26_Quirks#CSE" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Development/Bugs_%26_Quirks#CSE</a> for clues. If you figure out what the issue was, please come back and tell us exactly what it was so we can update the community docs on how to fix it. Edit: Some pointers: this comment has the fixes Bobo made that somehow ended up fixing a similar situation Are you using vaersion control, like git? That could help you out in narrowing down what caused the bug, if you make commits with some regularity and look at the history.&nbsp; GitLens is a great vscode extension that makes it easy to travel through a files history one commit at a time, displaying the changes side-by-side. your comment in the CSS doesn't follow general styleguides, placing spaces to separate the /* */ from the actual comment is usually done, so maybe roll20's css parser is throwing a fit about it. So instead of&nbsp; /*#endregion*/ , do /* #endregion */
1655629474

Edited 1655629581
Matthew C
Pro
Sheet Author
Hey thanks, I found it, it wasn't from that link but it gave me some ideas .sheet-darkmode .charsheet , .sheet-darkmode #dialog-window { &nbsp; background-color : white ; } did this as an emergency fix for darkmode, no idea why this breaks the rolltemplate...but it does, all I know is it is the id line, so my guess is that it is not playing friendly, since with or without the darkmode class just using the dialog-window screws the roll templates up so unfortunately this wont help most with this problem it is something to be careful with non the less