Skip to content

Instantly share code, notes, and snippets.

@eyy
Created December 30, 2014 22:11
Show Gist options
  • Select an option

  • Save eyy/e5bd6bf7d6f641995efb to your computer and use it in GitHub Desktop.

Select an option

Save eyy/e5bd6bf7d6f641995efb to your computer and use it in GitHub Desktop.
stylus text mixin: font-size, color, line-height etc. w/o trouble or order
alignment = left center right justify start end
text()
sized = false
for arg in arguments
if arg is a 'color'
color arg
else if arg is a 'unit'
if sized
line-height arg
else
sized = true
font-size arg
else if arg in alignment
text-align arg
else
font-weight arg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment