Css
css
¶
Utility class to handle CSS injection for interactive plots.
This class provides multiple ways to load CSS: directly from a
string, from a dictionary, or from a CSS file. It is intended to
be combined with interactive plots.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
from_string
|
str
|
CSS rules in a string. |
None
|
from_dict
|
Mapping[str, Mapping[str, object]]
|
Dictionary containing selectors as keys and dictionaries of property-value pairs as values. |
None
|
from_file
|
str
|
Path to a CSS file. |
None
|
(
interactive(p)
+ css(".tooltip { font-size: 2rem; }")
+ css(from_dict={".tooltip": {"font-size": "2rem"}})
+ css(from_file="style.css")
+ save("output.html")
)