Closed maltoe closed 6 months ago
Thank you! Do you think it would be better to add a col_attrs
attribute instead, and eventually deprecate col_style
?
Prior request: https://github.com/woylie/flop_phoenix/issues/223
Thank you! Do you think it would be better to add a
col_attrs
attribute instead, and eventually deprecatecol_style
?
Seems reasonable, yes. Or how about just calling it colgroup
to make it clear where these attrs go? colgroup: [style: "width: 10rem"]
Hi @woylie,
I'm currently adding a relatively strict CSP header to one of our apps (i.e. no
unsafe-inline
) and the inlinestyle
attributes on thecolgroup
elements are violating the policy. With this patch, I'd be able to set the styles via classes instead.This patch adds support for a new
:col_class
prop on:col
and:action
slots fortable/1
which sets theclass
attribute on the generatedcolgroup
. Additionally it removes emptystyle=""
attributes.Both of these changes are intended to prevent inline
style
attributes violating strict content-security-policies.... renders the following colgroup: