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

Roll Templates that use css Flex or Grid?

January 18 (6 years ago)
Peter H.
KS Backer

Could someone point me to some custom charactersheets that make use of flex or grids (I'd like to be able to view examples of both) in roll templates. 

I have a roll template where the last row can either have one or two items in it depending on the roll. Using tables, if there are two items they are not laid out well and it causes the items above to be skewed as well. 

From my reading I suspect flex would be the best option, however I'm still getting my head around CSS, so some 'real life' examples would assist with my understanding of both flex and grid and their workings. 

thanks all. 








January 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

With the table, if you output the html entity   (it's a HTML character for a space) in each table cell, instead of leaving them empty, it may fix your display.

January 18 (6 years ago)

https://css-tricks.com/snippets/css/a-guide-to-flexbox/

I haven't tried either flexbox or grid with templates. But in theory, they should work fine (grid is the upcoming standard and of this writing, I don't believe it's fully supported among all modern browsers.); flex would be more likely to be supported. You have to consider that your players might be using legacy browsers though. I guess you won't know until you try and one of your players lets you know. You should probably test in a number of browsers. Older versions Explorer and Firefox in my experience are the ones that give issues.

January 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

Roll20 is only officially supported on Chrome and Firefox, so you dont need to try to accommodate other browsers, and definitely shouldnt make any sacrifices to support  Internet Explorer.

January 18 (6 years ago)
Scott C.
Roll20 Production Team
Compendium Curator

Hi Peter,

I use both flexbox and CSS grid extensively in the Official Starfinder and Pathfinder Playtest sheets. The roll templates for both use grid, but the sheets as a whole should provide some solid examples of both methods in action.

Good luck,

Scott