File: module.py

package info (click to toggle)
cssutils 1.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,632 kB
  • sloc: python: 20,333; sh: 62; makefile: 20
file content (14 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys
import cssutils

sheet = cssutils.parseString('''
@variables { BG: #ab12cd }
html { background: var(BG) }
''')

css = sheet.cssText.decode()
expected = 'html {\n    background: #ab12cd\n    }'

print('got: %s\nexpected: %s' % (css, expected))
if css != expected:
    sys.exit(1)