pandas 1.4.2

ParametersReturns
__call__(self, declarations_str: 'str', inherited: 'dict[str, str] | None' = None) -> 'dict[str, str]'

Parameters

declarations_str : str

A list of CSS declarations

inherited : dict, optional

Atomic properties indicating the inherited style context in which declarations_str is to be resolved. inherited should already be resolved, i.e. valid output of this method.

Returns

dict

Atomic CSS 2.2 properties.

The given declarations to atomic properties.

Examples

This example is valid syntax, but we were not able to check execution
>>> resolve = CSSResolver()
... inherited = {'font-family': 'serif', 'font-weight': 'bold'}
... out = resolve('''
...  border-color: BLUE RED;
...  font-size: 1em;
...  font-size: 2em;
...  font-weight: normal;
...  font-weight: inherit;
...  ''', inherited)
... sorted(out.items()) # doctest: +NORMALIZE_WHITESPACE [('border-bottom-color', 'blue'), ('border-left-color', 'red'), ('border-right-color', 'red'), ('border-top-color', 'blue'), ('font-family', 'serif'), ('font-size', '24pt'), ('font-weight', 'bold')]
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/io/formats/css.py#88
type: <class 'function'>
Commit: