Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions panel/io/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down