mapmaker.sources.svg.styling module

class mapmaker.sources.svg.styling.ElementStyleDict(element, style_dict={})[source]

Bases: dict

class mapmaker.sources.svg.styling.StyleMatcher(style_element)[source]

Bases: Matcher

Parse CSS and add rules to the matcher.

match(element)[source]

Match selectors against the given element.

Parameters:

element – An ElementWrapper.

Returns:

A list of the payload objects associated to selectors that match element, in order of lowest to highest compiler.CompiledSelector specificity and in order of addition with add_selector() among selectors of equal specificity.

element_style(wrapped_element, parent_style=None)[source]
mapmaker.sources.svg.styling.wrap_element(element)[source]