Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added support and examples for SVG data URI

  • Loading branch information...
commit 85b1526930091917333247b81e73444e9a1626e4 1 parent ff0c3af
Mike Hemesath mhemesath authored
3  examples/images.styl
View
@@ -5,6 +5,9 @@ body
#wrapper
background url(/images/gopher.jpg)
+#footer
+ background url(/images/gradient.svg)
+
.sprite
// both work due to the additional paths option
// passed to stylus.url()
9 examples/images/gradient.svg
View
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1" preserveAspectRatio="none" version="1.1" >
+ <defs>
+ <linearGradient id="g" x1="0%" y1="0%" x2="0%" y2="100%">
+ <stop offset="0%" stop-color="#000"/>
+ <stop offset="100%" stop-color="#45484d"/>
+ </linearGradient>
+ </defs>
+ <rect fill="url(#g)" width="1" height="1" />
+</svg>
1  lib/functions/url.js
View
@@ -25,6 +25,7 @@ var mimes = {
, '.png': 'image/png'
, '.jpg': 'image/jpeg'
, '.jpeg': 'image/jpeg'
+ , '.svg': 'image/svg+xml'
};
/**
Please sign in to comment.
Something went wrong with that request. Please try again.