Skip to content

Instantly share code, notes, and snippets.

@lrobeson
Created February 7, 2014 00:15
Show Gist options
  • Save lrobeson/8855186 to your computer and use it in GitHub Desktop.
Save lrobeson/8855186 to your computer and use it in GitHub Desktop.
Example of Sass mixins. Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@mixin buttonstyle {
background: red;
border: 1px solid black;
color: #fff;
}
@mixin rectangle($width,$height) {
border: 1px solid black;
display: block;
height: $height;
width: $width;
}
input {
@include buttonstyle;
font-size: 20px;
}
.mynewbox {
@include rectangle(400px,200px);
}
input {
background: red;
border: 1px solid black;
color: #fff;
font-size: 20px;
}
.mynewbox {
border: 1px solid black;
display: block;
height: 200px;
width: 400px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment