posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.9k stars 72 forks source link

Add an inline CSS option to the `as_raw_html` method #497

Open tnederlof opened 1 month ago

tnederlof commented 1 month ago

Prework

Proposal

Add the ability to inline CSS styles to the `GT.as_raw_html' method to allow tables to render properly in emails.

The gt R packages has a helpful argument inline_css to the as_raw_html() function which inlines CSS styles. This allows tables to render correctly in emails, especially when using this feature in Quarto/Posit Connect (https://docs.posit.co/connect/user/quarto/#email-customization).

Yasin197 commented 1 month ago

This would be a great addition! Hope it makes it out on the next release