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:
eafd74d
)
stylus: fix sprite() so it doesn't require .n0 class
author
Jason Woofenden
<jason@jasonwoof.com>
Sun, 21 Feb 2016 18:50:02 +0000
(13:50 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sun, 21 Feb 2016 18:50:02 +0000
(13:50 -0500)
stylus_helpers.styl
patch
|
blob
|
history
diff --git
a/stylus_helpers.styl
b/stylus_helpers.styl
index
d885abe
..
85f8d12
100644
(file)
--- a/
stylus_helpers.styl
+++ b/
stylus_helpers.styl
@@
-150,7
+150,14
@@
sprites(image, height, count, v_offset = 0, h_offset = 0)
y = - (@height * n) - unit(v_offset, px)
background-position: (0 - unit(h_offset, px)) y
sprite(image, height, v_offset = 0, h_offset = 0)
y = - (@height * n) - unit(v_offset, px)
background-position: (0 - unit(h_offset, px)) y
sprite(image, height, v_offset = 0, h_offset = 0)
- sprites(image, height, 1, v_offset, h_offset)
+ height: unit(height, px)
+ if image[1]
+ background: url(image[0])
+ background: url(image[1]), linear-gradient(transparent, transparent);
+ else
+ background-image: url(image)
+ background-repeat: no-repeat;
+ background-position: (0 - unit(h_offset, px)) (0 - unit(v_offset, px))
// Styling for a variable height element with an image background where the
// middle repeats vertically. You must split your image into three images, and
// Styling for a variable height element with an image background where the
// middle repeats vertically. You must split your image into three images, and