Skip to content

Commit ec91829

Browse files
committed
Don't linewrap css in svg header.
Output the tiny bit of CSS in every SVG header as ```xml <style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;}</style> ``` instead of the slightly weirdly indented ``` <style type="text/css"> *{stroke-linecap:butt;stroke-linejoin:round;} </style> ```
1 parent a8831d5 commit ec91829

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/backends/backend_svg.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,7 @@ def _write_default_style(self):
430430
'stroke-linejoin': 'round',
431431
'stroke-linecap': 'butt'})
432432
writer.start('defs')
433-
writer.start('style', type='text/css')
434-
writer.data('*{%s}\n' % default_style)
435-
writer.end('style')
433+
writer.element('style', type='text/css', text='*{%s}' % default_style)
436434
writer.end('defs')
437435

438436
def _make_id(self, type, content):

0 commit comments

Comments
 (0)