Fix: inline svg

This commit is contained in:
eight 2017-11-09 08:01:45 +08:00
parent fa1c55bc2a
commit 7266c38d56
3 changed files with 9 additions and 7 deletions

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 148 B

View File

@ -8,7 +8,8 @@ body {
box-sizing: border-box; box-sizing: border-box;
} }
img.icon { img.icon,
svg.icon {
height: 1.4em; height: 1.4em;
vertical-align: middle; vertical-align: middle;
} }

View File

@ -111,9 +111,13 @@
frag.appendChild(makeLink( frag.appendChild(makeLink(
url, url,
$element({ $element({
tag: 'img', tag: 'svg#svg',
className: 'icon', viewBox: '0 0 20 20',
src: '/install-usercss/external.svg' class: 'icon',
appendChild: $element({
tag: 'svg#path',
d: 'M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z'
})
}) })
)); ));
} }