Can't use inline CSS in stat block template

closed
· Statblocks template creator (studio) ·
By alexandritegames on 08/08/2026
· Assigned to katerinach
· Not a Bug

Currently Twig strips out inline CSS from the statblock display template. I'd like to have a border color based on another input, which I know how to do, but when I write '<div class="description" style="border: 3px solid bordercolor ">' Twig strips out the word "style".

I believe this can be fixed by enabling inline_css from Twig: https://twig.symfony.com/doc/3.x/filters/inline_css.html.

Steps to Reproduce

<div class="description" style="border: 3px solid bordercolor ;">text </div> renders as <div class="description" ="border: 3px solid green;">text </div>

Operating System

Windows

Browser

Google Chrome

History

Tillerz @ 18 Aug, 2026 03:28:20

Hey,   why do you apply a style directly? This is not how it should be done. Just use the CSS section for the statblock and define the style there:  

.description { border: 3px solid black }
  or something.

katerinach @ 18 Aug, 2026 03:30:47 Assignee
Assigned katerinach
katerinach @ 19 Aug, 2026 09:42:12 Assignee

Indeed, we limit inline styling for security reasons, but you can freely use the styling field in the same page for everything you need!

katerinach @ 19 Aug, 2026 09:42:18 Assignee
katerinach Added tag Not a Bug
katerinach @ 19 Aug, 2026 09:42:22 Assignee
set this bug to closed