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

Injecting css into chat?

besides inserting styles directly into the element e.g. style="color:red". Is there a way to inject styles for theming purposes?  I would like to build template literal html form with css/sass.  e.g.   <div class="${containerStyle}">Internal stuff</div>. (Typescript Template literal). I would need to load the style data into something similar to the header style element <style>. I have the html literal working, just need the css/sass etc. 
1587087899

Edited 1587087940
GiGs
Pro
Sheet Author
API Scripter
The Power Cards API Script was designed for this (for styling output into chat, that is, not necessarily the specific technique your using). It has an active thread you can ask for help.
1587090837
The Aaron
Roll20 Production Team
API Scripter
There isn't a way to style API text output other than with inline styling.  Note also that the inline styles get filtered so not everything works.
Well that's poo poo.  :P 
Second, question, is there documentation or a list of styles that are filtered? Thus I can stay away from them.
1587130014
The Aaron
Roll20 Production Team
API Scripter
Nope.  Most normal stuff works.  Most function style stuff doesn't.  It's trial and error at its finest... 
Thank you for the info. I sincerely appreciate it!