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

Cant change roll button?

Hey, Im trying to change the standart roll button and remove the d20 logo. And i have done this in the past by using: button[type="roll"].textroll::before{content: '';} But now nothing happens? Have i missed something with the new update? Best, Niels
1618239698

Edited 1618239749
No matter.... Found this aswer while looking for something else.... So if anybody else got this problem here is the answer: Finderski  said: If you're using the new sanitization rules (i.e. "Legacy": false), you have to get a lot more explicit with the CSS I'm finding.  To remove the die icon on roll buttons I had to put the class of the container the button is in.  So, for example... HTML <div class="sheet-functions">     <button class="topbuttons fearButton" type='roll' name='roll_fearCheckRoll' title="@{fearCheckRoll}" value='formula'>😱</button> </div> CSS . functions button [ type = roll ] . fearButton :: before { content : '' ; }
1618243377
Andreas J.
Forum Champion
Sheet Author
Translator
Yeah, with doing a sheet in CSE I feel you need to be more specific(than before) with roll buttons & text/number inputs for the CSS to apply.
1618288197

Edited 1618288273
vÍnce
Pro
Sheet Author
Adding a wrapper is probably always a good idea...  I started adding .charsheet to help with the specificity issues under CES as quick solution. ie .charsheet button[type="roll"].textroll::before{content: '';}
Hi All, Sorry to hear that the new sanitization rules are causing problems! Some great suggestions to work around them in this thread. I can also suggest this as a potential (albeit ugly) solution.
1618332669

Edited 1618332690
vÍnce
Pro
Sheet Author
@Nic Love it when someone from roll20 refers us to an article that's entitled "Hacks for dealing with..." ;-P
If it helps you can replace the word hacks with techniques . c;
1618334197
Finderski
Pro
Sheet Author
Compendium Curator
Sadly, it sounds like we may be better off breaking one of those rules for R20 character sheets...perhaps we should use IDs, because R20 is forcing some crazy specificity requirements now...unless, .charsheet is a quick work around? Because things like label and number inputs require (at least in my experience) a container (or a container's class) + element type + element type class to override the R20 defaults, because those seem to have like three different things adding to their specificity.
Sorry Finderski, I should have taken greater care with my link. The part of that article I was trying to point to was the 'safely increasing specificity' section. This should allow you to easily and safely override anything on the sheet. That said, I wasn't aware that such a degree of specificity was required for the new CSE. My experience of using it hasn't been the same, other than for very specific elements. If you'd be willing to share snippets for issues you're having, I can pass them on and see what can be done about it.
1618339428
Finderski
Pro
Sheet Author
Compendium Curator
Oh, that link is really cool! I didn't know you could double-up the class like that.  I'll try to get an example of what I've been doing to show you the problem I've been having, but that little trick of doubling-up may solve that problem.
1618344070
Andreas J.
Forum Champion
Sheet Author
Translator
Nic B. said: Sorry Finderski, I should have taken greater care with my link. The part of that article I was trying to point to was the 'safely increasing specificity' section. This should allow you to easily and safely override anything on the sheet. That's a funny trick
1618501189
.Hell
Sheet Author
Nic B. said: Sorry Finderski, I should have taken greater care with my link. The part of that article I was trying to point to was the 'safely increasing specificity' section. This should allow you to easily and safely override anything on the sheet. That said, I wasn't aware that such a degree of specificity was required for the new CSE. My experience of using it hasn't been the same, other than for very specific elements. If you'd be willing to share snippets for issues you're having, I can pass them on and see what can be done about it. To overwrite the css in .charsheet you need to have at least one more specifier then before. Most CSS I saw had at most 2 specifier before the changes. If people are not expierienced in CSS this is quite a huge issue. Maybe information about that should be added to the conversion post/page/wiki