Skip to content

Instantly share code, notes, and snippets.

@texuf
Created April 4, 2015 04:02
Show Gist options
  • Save texuf/1e1ef7fce7aaa67caf4d to your computer and use it in GitHub Desktop.
Save texuf/1e1ef7fce7aaa67caf4d to your computer and use it in GitHub Desktop.
fix for "WARNING Property: Unknown Property name." error from cssutils
from cssutils import profile
from cssutils.profiles import Profiles, properties, macros
#patch um up
properties[Profiles.CSS_LEVEL_2]['-ms-interpolation-mode'] = r'none|bicubic|nearest-neighbor'
properties[Profiles.CSS_LEVEL_2]['-ms-text-size-adjust'] = r'none|auto|{percentage}'
properties[Profiles.CSS_LEVEL_2]['mso-table-lspace'] = r'0|{num}(pt)'
properties[Profiles.CSS_LEVEL_2]['mso-table-rspace'] = r'0|{num}(pt)'
properties[Profiles.CSS_LEVEL_2]['-webkit-text-size-adjust'] = r'none|auto|{percentage}'
#re-add
profile.addProfiles([(Profiles.CSS_LEVEL_2,
properties[Profiles.CSS_LEVEL_2],
macros[Profiles.CSS_LEVEL_2]
)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment