You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest Chrome Canary (Version 51.0.2663.0 canary (64-bit)) fails to display postcss-svg-generated inline SVGs. Using postcss-svgo (SVG Optimiser) after fixes this issue.
Try out:
<html>
<style>
body {
display: flex;
justify-content: center;
}
div {
margin: 1em;
padding: 1em;
width: 8em;
height: 8em;
background-color: orange;
}
.notworking { /* plain postcss-svgo output */
background-image: url("data:image/svg+xml,%3Csvg%20id%3D%22ei-chevron-right-icon%22%20viewBox%3D%220%200%2050%2050%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20style%3D%22fill%3Ablack%3B%22%20height%3D%22%22%20width%3D%22%22%3E%3Cpath%20d%3D%22M22.7%2034.7l-1.4-1.4%208.3-8.3-8.3-8.3%201.4-1.4%209.7%209.7z%22%2F%3E%3C%2Fsvg%3E");
}
.working { /* after applying postcss-svgo */
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.7 34.7l-1.4-1.4 8.3-8.3-8.3-8.3 1.4-1.4 9.7 9.7z'/%3E%3C/svg%3E");
}
</style>
<body>
<div class="notworking">Plain postcss-svg output: not working in chrome</div>
<div class="working">Plain postcss-svg output + applying postcss-svgo: working in chrome</div>
</body>
</html>
The text was updated successfully, but these errors were encountered:
The latest Chrome Canary (Version 51.0.2663.0 canary (64-bit)) fails to display
postcss-svg
-generated inline SVGs. Usingpostcss-svgo
(SVG Optimiser) after fixes this issue.Try out:
The text was updated successfully, but these errors were encountered: