diff --git a/panel/io/resources.py b/panel/io/resources.py index dce883db65..dcf6686e7d 100644 --- a/panel/io/resources.py +++ b/panel/io/resources.py @@ -216,12 +216,13 @@ def process_raw_css(raw_css: list[str]) -> list[str]: @lru_cache(maxsize=None) def loading_css(loading_spinner: str, color: str, max_height: int): - return textwrap.dedent(f""" - :host(.pn-loading):before, .pn-loading:before {{ - background-color: {color}; - mask-size: auto calc(min(50%, {max_height}px)); - -webkit-mask-size: auto calc(min(50%, {max_height}px)); - }}""") + return ( + f"\n:host(.pn-loading):before, .pn-loading:before {{\n" + f" background-color: {color};\n" + f" mask-size: auto calc(min(50%, {max_height}px));\n" + f" -webkit-mask-size: auto calc(min(50%, {max_height}px));\n" + f"}}" + ) def resolve_custom_path( obj, path: str | os.PathLike, relative: bool = False