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 (from parent 1:
5dfdf5f
)
stylus-helpers: fix space-evenly, add dimensions
author
Jason Woofenden
<jason@jasonwoof.com>
Thu, 13 Nov 2014 16:47:05 +0000
(11:47 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Thu, 13 Nov 2014 16:47:05 +0000
(11:47 -0500)
stylus-helpers.styl
patch
|
blob
|
history
diff --git
a/stylus-helpers.styl
b/stylus-helpers.styl
index
6f446a3
..
fc70579
100644
(file)
--- a/
stylus-helpers.styl
+++ b/
stylus-helpers.styl
@@
-49,12
+49,17
@@
fixed()
relative()
_pos('relative', arguments)
relative()
_pos('relative', arguments)
+// Specify width and height on the same line
+dimensions(w, h)
+ width: _px(w)
+ height: _px(h)
+
// Make children of this element inline-blocks that are spaced evenly accross.
//
// To create a minimum distance between: don't use word-spacing, it's broken in
// firefox. Instead, try padding on the children and negative margin on the
// parent.
// Make children of this element inline-blocks that are spaced evenly accross.
//
// To create a minimum distance between: don't use word-spacing, it's broken in
// firefox. Instead, try padding on the children and negative margin on the
// parent.
-space_evenly(line_height = 1.2em)
+space-evenly(line_height = 1.2em)
text-align justify
& > *
display inline-block
text-align justify
& > *
display inline-block
@@
-89,13
+94,13
@@
space_evenly(line_height = 1.2em)
// sprite-rollover "images/nav.png" 150 35 2
sprite-rollover(image, width, height, count)
width = unit(width, px)
// sprite-rollover "images/nav.png" 150 35 2
sprite-rollover(image, width, height, count)
width = unit(width, px)
- height = unit(width, px)
+ height = unit(height, px)
width width
height height
background: transparent url(image) top left no-repeat;
for n in (1..count)
&.n{n}
width width
height height
background: transparent url(image) top left no-repeat;
for n in (1..count)
&.n{n}
- y = (2px - n * 35px)
+ y = (height - n * height)
background-position 0 y
&:hover
background-position -(width) y
background-position 0 y
&:hover
background-position -(width) y