|
|
@ -60,6 +60,7 @@ class Svg(object): |
|
|
|
|
|
|
|
|
|
|
|
def add_styles(self): |
|
|
|
def add_styles(self): |
|
|
|
"""Add the css to the svg""" |
|
|
|
"""Add the css to the svg""" |
|
|
|
|
|
|
|
all_css = [] |
|
|
|
for css in ['base.css'] + list(self.graph.css): |
|
|
|
for css in ['base.css'] + list(self.graph.css): |
|
|
|
if urlparse(css).scheme: |
|
|
|
if urlparse(css).scheme: |
|
|
|
self.processing_instructions.append( |
|
|
|
self.processing_instructions.append( |
|
|
@ -76,8 +77,9 @@ class Svg(object): |
|
|
|
font_sizes=self.graph.font_sizes()) |
|
|
|
font_sizes=self.graph.font_sizes()) |
|
|
|
if not self.graph.pretty_print: |
|
|
|
if not self.graph.pretty_print: |
|
|
|
css_text = minify_css(css_text) |
|
|
|
css_text = minify_css(css_text) |
|
|
|
self.node( |
|
|
|
all_css.append(css_text) |
|
|
|
self.defs, 'style', type='text/css').text = css_text |
|
|
|
self.node( |
|
|
|
|
|
|
|
self.defs, 'style', type='text/css').text = '\n'.join(all_css) |
|
|
|
|
|
|
|
|
|
|
|
def add_scripts(self): |
|
|
|
def add_scripts(self): |
|
|
|
"""Add the js to the svg""" |
|
|
|
"""Add the js to the svg""" |
|
|
|