Skip to content

Styles

A class that represents a style, which is a collection of properties that determine the appearance and properties of a layer or map.

It can split css into tags, ids and classes.

Usage

To create a style object use the following code:

import tailwindall.styles as styles
style = styles.Styles.parse("css_string") # parse a string of css
style = styles.Styles.parse("css_file_path", file=True) # parse a file of css

Arguments

ArgumentTypeDescriptionDefaultSee Also
stylestrThe css string or file path to parseNone
fileboolWhether the style argument is a file path or notFalse

CSS Parsing

This is the accepted css format:

/* tag */
label {property:value;}
/* id */
#id {property:value;}
/* class */
.class {property:value;}