Skip to content

Instantly share code, notes, and snippets.

var square;
square = function(x) {
return x * x;
};
@glynrob
glynrob / gist:6011903
Created July 16, 2013 19:36
Stylus Comments
// Single-line comment, and do not output in the resulting CSS</code>
/*
* Multi-line comment only output when the compress option is not enabled.
*/
/*!
* Multi-line buffered to output the comment regardless of compression
*/
a
color:#000000
&:hover{
color:#CCCCCC
cross-box-shadow(args)
-webkit-box-shadow args
-moz-box-shadow args
box-shadow args
.btn
cross-box-shadow (5px, 5px, 6px, rgba(0, 0, 0, 0.3))
@glynrob
glynrob / gist:6011800
Last active December 19, 2015 20:09
Mixin Stylus
cross-border-radius(args)
-webkit-border-radius args
-moz-border-radius args
border-radius args
.btn
cross-border-radius 10px
// Variables
red = #BF3130
green = #689B00
blue = #1440AB
.red
background-color red
@glynrob
glynrob / gist:6011748
Created July 16, 2013 19:19
Generated Output
body {
background-color: #50596f;
font-family: Arial, Helvetica, sans-serif;
}
@glynrob
glynrob / gist:6011743
Last active December 19, 2015 20:09
Stylus Basic Example
body
background-color desaturate(blue, 80%) // function desaturate
font-family Arial, Helvetica, sans-serif
@glynrob
glynrob / gist:5996319
Created July 14, 2013 22:08
SCSS Nested
a{
color:#000000;
&:hover{
color:#CCCCCC;
}
}
@glynrob
glynrob / gist:5996316
Created July 14, 2013 22:06
SCSS Mixins
@mixin border-radius ($radius: 5px) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
.btn{
@include border-radius(10px);
}