Printrun/printrun/svg/css/inline.py
2012-07-31 11:04:13 +02:00

8 lines
No EOL
243 B
Python

""" Parser for inline CSS in style attributes """
def inlineStyle(styleString):
if not styleString:
return {}
styles = styleString.split(";")
rv = dict(style.split(":") for style in styles if len(style) != 0)
return rv