File: inline.py

package info (click to toggle)
python-enable 4.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,280 kB
  • ctags: 13,899
  • sloc: cpp: 48,447; python: 28,502; ansic: 9,004; makefile: 315; sh: 44
file content (8 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
""" Parser for inline CSS in style attributes """

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