Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
062d46e
)
stylus: support svg sprites with pixmap fallback
author
Jason Woofenden
<jason@jasonwoof.com>
Fri, 18 Sep 2015 22:30:18 +0000
(18:30 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Fri, 18 Sep 2015 22:30:18 +0000
(18:30 -0400)
stylus_helpers.styl
patch
|
blob
|
history
diff --git
a/stylus_helpers.styl
b/stylus_helpers.styl
index
df34bb0
..
3c358f0
100644
(file)
--- a/
stylus_helpers.styl
+++ b/
stylus_helpers.styl
@@
-95,7
+95,11
@@
space_evenly(line_height = 1.2em)
sprites_rollover(image, width, height, count, v_offset = 0, h_offset = 0)
width: unit(width, px)
height: unit(height, px)
sprites_rollover(image, width, height, count, v_offset = 0, h_offset = 0)
width: unit(width, px)
height: unit(height, px)
- background-image: url(image)
+ if image[1]
+ background: url(image[0])
+ background: url(image[1]), linear-gradient(transparent, transparent);
+ else
+ background-image: url(image)
background-position: top left
background-repeat: no-repeat;
for n in (0...count)
background-position: top left
background-repeat: no-repeat;
for n in (0...count)
@@
-110,7
+114,11
@@
sprite_rollover(image, width, height, v_offset = 0, h_offset = 0)
// see sprites_rollover
sprites(image, height, count, v_offset = 0, h_offset = 0)
height: unit(height, px)
// see sprites_rollover
sprites(image, height, count, v_offset = 0, h_offset = 0)
height: unit(height, px)
- background-image: url(image)
+ if image[1]
+ background: url(image[0])
+ background: url(image[1]), linear-gradient(transparent, transparent);
+ else
+ background-image: url(image)
background-position: top left
background-repeat: no-repeat;
for n in (0...count)
background-position: top left
background-repeat: no-repeat;
for n in (0...count)