/usr/share/doc/python-cssutils/examples/minify.py is in python-cssutils 0.9.10-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import logging, StringIO
EXPOUT = "@variables{c:#0f0}a{color:var(c)}\na{color:#0f0}\n"
EXPERR = u'Property: Found valid "CSS Level 2.1" value: #0f0 [6:9: color]\n'
def main():
import cssutils
import cssutils.script
css = '''
@variables {
c: #0f0;
}
a {
color: var(c);
}
'''
s = cssutils.parseString(css)
cssutils.ser.prefs.useMinified()
cssutils.ser.prefs.resolveVariables = False
print s.cssText
# reset
cssutils.ser.prefs.resolveVariables = True
print s.cssText
if __name__ == '__main__':
main()
|