Skip to content

Instantly share code, notes, and snippets.

@digitaldrummerj
Last active October 20, 2015 20:25
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 digitaldrummerj/43544309fa772ea1b9d8 to your computer and use it in GitHub Desktop.
Save digitaldrummerj/43544309fa772ea1b9d8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="button-group">
<button class="primary">Primary</button>
<button class="secondary">Secondary</button>
<button class="secondary">Secondary</button>
</div>
// ----
// libsass (v3.2.5)
// ----
$backgroundColor: lightGray;
body {
background-color: $backgroundColor;
}
button {
width: 200px;
border: 2px solid;
font-size: 24px;
border-radius: 4px;
}
@mixin sassyButton($width, $font-size, $color){
@extend button;
width: $width;
font-size: $font-size;
border-color: $color;
background-color:lighten($color, 30%);
color:darken($color, 10%);
transition: box-shadow 1s, transform 1s ease-in;
&:hover{
cursor:pointer;
background-color: lighten($color, 40%);
box-shadow: 4px 4px 8px gray;
transform:rotate(360deg);
}
}
#button-group {
.primary {
@include sassyButton(200px, 40px, blue);
}
.secondary {
@include sassyButton(250px, 30px, orange);
}
}
body {
background-color: lightGray;
}
button, #button-group .primary, #button-group .secondary {
width: 200px;
border: 2px solid;
font-size: 24px;
border-radius: 4px;
}
#button-group .primary {
width: 200px;
font-size: 40px;
border-color: blue;
background-color: #9999ff;
color: #0000cc;
transition: box-shadow 1s, transform 1s ease-in;
}
#button-group .primary:hover {
cursor: pointer;
background-color: #ccccff;
box-shadow: 4px 4px 8px gray;
transform: rotate(360deg);
}
#button-group .secondary {
width: 250px;
font-size: 30px;
border-color: orange;
background-color: #ffdb99;
color: #cc8400;
transition: box-shadow 1s, transform 1s ease-in;
}
#button-group .secondary:hover {
cursor: pointer;
background-color: #ffedcc;
box-shadow: 4px 4px 8px gray;
transform: rotate(360deg);
}
<div id="button-group">
<button class="primary">Primary</button>
<button class="secondary">Secondary</button>
<button class="secondary">Secondary</button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment