mirror of https://github.com/Kozea/pygal.git
jaraco
15 years ago
2 changed files with 24 additions and 0 deletions
@ -0,0 +1,22 @@
|
||||
import cssutils |
||||
|
||||
SVG = 'SVG 1.1' # http://www.w3.org/TR/SVG11/styling.html |
||||
|
||||
macros = cssutils.profile._MACROS.copy() |
||||
macros.update({ |
||||
'paint': 'none|currentColor|{color}', |
||||
# spec actually says length, but our length macro requires units, so use positivenum |
||||
'dasharray': '{positivenum}(\s*,\s*{positivenum})*', |
||||
}) |
||||
properties = { |
||||
'stroke': '{paint}', |
||||
'fill': '{paint}', |
||||
'text-anchor': 'start|middle|end|inherit', |
||||
'stroke-width': '{length}|inherit', |
||||
'fill-opacity': '{num}|inherit', |
||||
'stroke-dasharray': 'none|{dasharray}|inherit', |
||||
} |
||||
|
||||
cssutils.profile.addProfile(SVG, properties, macros) |
||||
|
||||
cssutils.profile.defaultProfiles = [SVG, cssutils.profile.CSS_LEVEL_2] |
Loading…
Reference in new issue