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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Allow reusing some CSS in API scripts and character sheets

I'd love to be able to reuse some of Roll20's CSS in my API scripts and character sheets (the grid system would be an amazing help for char sheets), but all classes in sheets and API scripts get prefixed with "sheet-" or "userscript-", respectively. Could we get access to a subset of CSS so we don't have to reinvent the wheel for every new addon?
1438714352
The Aaron
Pro
API Scripter
I actually brought up the API's use of CSS at the Roll20 Panel at GenCon, which met with a favorable response from the devs (no promises!).
Great to hear! I'll keep my fingers crossed.
1444647939
Lithl
Pro
Sheet Author
API Scripter
PunsOfAnarchy said: I'd love to be able to reuse some of Roll20's CSS in my API scripts and character sheets (the grid system would be an amazing help for char sheets), but all classes in sheets and API scripts get prefixed with "sheet-" or "userscript-", respectively. Could we get access to a subset of CSS so we don't have to reinvent the wheel for every new addon? A subset of the site's CSS can  be used with API script output in chat. A while ago, the "userscript-" prefix was only added to the first class in the class attribute, so things like Hony Badger's PowerCards would do things like class="a inlinerollresult showtip tipsy-n fullcrit" , which got translated to class="userscript-a inlinerollresult showtip tipsy-n fullcrit" . That error of omission has been rectified, adding "userscript-" to all classes present, but at the same time those particular userscript-X classes copy their X class counterparts. The main difference with the userscript-tooltip classes is that it adds the text "API or player-generated content" to the edge of the tooltip, so that an API script can't fool a player into thinking that it's a genuine inline roll from the dice engine. I'm not certain of the full extent of the userscript-* class copies, but they do exist.
Thanks for the suggestion! After 30 days, Suggestions and Ideas with fewer than 10 votes are closed and the votes are refunded to promote freshness. Your suggestion didn't build the right momentum this time, but feel free to submit it again! We find that the best suggestions describe the problem you are having, and the solution you want. You can learn more about the process of making suggestions on the Roll20 Wiki! More details can be found here .