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

Changing button colors.

When I change the color of a roll button, it works fine in the preview, but when I open the sheet in the campaign, the button reverts to its default color. While clicking the button, it shows the correct color, and when hovering over the button, half the button changes color. I tried setting the color for hover, active and focus, and get the same result. Is it possible to override the default color?
1402367776
Lithl
Pro
Sheet Author
API Scripter
By default, the button has a gradient set on the background image. You can clear it like this: button, button:hover, button:active { background-image: none; } Of course, you can also supply your own background image.
Perfect - thanks
Is there any way to remove the d20 image from the button? I tried putting in my own image, but the d20 image still overlays partly over it.
1402377178
Lithl
Pro
Sheet Author
API Scripter
The button has a ::before pseudo-element which has the font set to dicefont20 and the content set to "t" (the d20 image). However, you need to beat the default stylesheet's specificity to change it. The best way I can think of would be to put a class on the button (eg, <button type="roll" class="sheet-plain" name="attr_my-roll" value="/r 1d20"></button> ). Then use some CSS like this: button[type="roll"].sheet-plain::before { content: ""; } You could also put other text or images on the button this way if you like, although if you put text on it, you should probably change the font to something other than dicefont20.