Skip to content

Instantly share code, notes, and snippets.

@ahmedelgabri
Created December 1, 2014 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedelgabri/465aabef9a5ff7793001 to your computer and use it in GitHub Desktop.
Save ahmedelgabri/465aabef9a5ff7793001 to your computer and use it in GitHub Desktop.
Media queries in Stylus
MQ = true
mq(point, query1=min, query2=width)
if MQ
query = 'screen and (%s-%s: %sem)' % (query1 query2 point/16)
@media query
{block}
else
{block}
myMixin( b )
query = 'only screen and (max-width: %s)' % b
@media query
{block}
_placeholder()
::-webkit-input-placeholder
{block}
input:-moz-placeholder
{block}
input:-ms-input-placeholder
{block}
cal(a, b)
a+b
div
color black
+mq(300, max, height)
font gerogia
+_placeholder()
color red
font cal(10, 50)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment