Skip to content

Instantly share code, notes, and snippets.

@sadaco
Created May 31, 2012 12:59
Show Gist options
  • Select an option

  • Save sadaco/2843256 to your computer and use it in GitHub Desktop.

Select an option

Save sadaco/2843256 to your computer and use it in GitHub Desktop.
Add parameters
@lightblue:#a9c6d2;
.cloudstyle(@bgColour, @border-radius){ // Here we add the parameters
content: '';
position: absolute;
background: @bgColour;
z-index: -1;
.rounded(@border-radius);
} //every part of the Cloud has this style
#cloud {
width: 350px;
height: 120px;
position: relative;
margin: 120px auto 20px;
background: @lightblue;
.rounded(100px);
}
#cloud:before {
.cloudstyle(#292929, 200px); //we use the mixin and we specify different values for the parameters
width: 180px;
height: 180px;
top: -90px;
right: 50px;
}
#cloud:after{
.cloudstyle(#d91656, 100px);//same here
width: 100px;
height: 100px;
top: -50px;
left: 50px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment