Skip to content

Instantly share code, notes, and snippets.

@shimakyohsuke
Created June 19, 2015 07:51
Show Gist options
  • Save shimakyohsuke/a5bd2c3239a781d644bc to your computer and use it in GitHub Desktop.
Save shimakyohsuke/a5bd2c3239a781d644bc to your computer and use it in GitHub Desktop.
Stylus mixins
ds(w,h = auto,f = left)
width w
height h
float f
lh(n)
line-height (n * 100)%
fs(c,fz,lh,fw = 400)
color c
font-size fz
line-height (lh * 100)%
font-weight fw
opa(o,t = 0.25)
opacity o
transition t
marginTop(t-baseMargin = 20px, t-FontSize = 14px, t-LineHeight = 22px)
margin-top (t-baseMargin - ((t-LineHeight - t-FontSize) / 2))
marginBottom(b-baseMargin = 20px, b-FontSize = 14px, b-LineHeight = 22px)
margin-bottom (t-baseMargin - ((t-LineHeight - t-FontSize) / 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment