diff --git a/great_tables/_export.py b/great_tables/_export.py index cebb082a3..e5f0183e3 100644 --- a/great_tables/_export.py +++ b/great_tables/_export.py @@ -9,8 +9,11 @@ from pathlib import Path from typing import TYPE_CHECKING, Literal +from css_inline import inline, inline_fragment from typing_extensions import TypeAlias +from ._helpers import random_id +from ._scss import compile_scss from ._utils import _try_import from ._utils_render_latex import _render_as_latex @@ -126,19 +129,29 @@ def show( def as_raw_html( self: GT, + inline_css: bool = False, make_page: bool = False, all_important: bool = False, ) -> str: """ Get the HTML content of a GT object. - Get the HTML content from a GT object as a string. This function is useful for obtaining the - HTML content of a GT object for use in other contexts. + Get the HTML content from a GT object as a string. By default, the generated HTML will have + inlined styles, where CSS styles (that were previously contained in CSS rule sets external to + the `