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

How to get tabular layout in Handouts from the API (without using tables)?

June 26 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

I'm working on a script to display character stats in a handout, and i;m discovering most of the CSS techniques I'm familiar with (like grid) aren't working.

I see a bunch of old posts (predating the chat format update) talking about a lot of css and styling being stripped from output generated from the API, as well as a lot of !important being added which interferes with attempts to add your own styling.

So how do you generate, say, a tabular layout in a handout that doesn't use html tables?

What other styling gotchas are there, and workarounds for them?

June 27 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

Tables are ideally suited for tabular data, why wouldn't you want to use them?

June 27 (4 years ago)

Edited June 27 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Because they look awful in handouts. Aren't they fairly resistant to styling too?

I might be showing some bias - i have always disliked roll20's implementation of tables. 

June 27 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Also to clarify, I'm not just talking about tabular data - but table-like layouts, like you see in character sheets.

June 27 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

I've had a lot of luck with spans set to display:block.

June 27 (4 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Take a look at how Stephen handled them in his Markdown script. They look pretty nice there.

June 27 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

Do you have a link for that script? I'm not seeing it on the github.

June 27 (4 years ago)
Kraynic
Pro
Sheet Author

It may not be there.  Sort of like someone's Chat Menu script...  :P

The thread with links in the first post is here:  https://app.roll20.net/forum/post/8028597/script-markdown-handouts-and-bios/?pagenum=1

June 27 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

hehe, thanks.