Created
August 1, 2013 14:23
-
-
Save codingdesigner/6131833 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com, the Sass playground.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- | |
// Sass (v3.2.9) | |
// --- | |
@mixin button-base { | |
border-radius: 0.2em; | |
border: { | |
width: 1px; | |
style: solid; | |
} | |
font: { | |
family: sans-serif; | |
weight: normal; | |
size: 0.9rem; | |
} | |
line-height: 1.25; | |
text-transform: uppercase; | |
padding: 0.2em 0.5em; | |
} | |
@mixin button-colors($button-color: #ECECEC, $button-text-color: #2d2d2d) { | |
color: $button-text-color; | |
background: { | |
color: $button-color; | |
} | |
border: { | |
color: adjust-color($button-color, $lightness: -10%) | |
} | |
text-shadow: adjust-color($button-color, $lightness: 15%) 1px 1px 0; | |
&:hover { | |
background: { | |
color: adjust-color($button-color, $lightness: 5%); | |
} | |
} | |
&:active { | |
background: { | |
color: adjust-color($button-color, $lightness: 10%); | |
} | |
} | |
} | |
%button { | |
@include button-base; | |
@include button-colors(); | |
} | |
%button-cta { | |
@extend %button; | |
@include button-colors($button-color: #bada55); | |
} | |
%button-coffee { | |
@include button-base; | |
@include button-colors($button-color: #c0ffee); | |
} | |
@media (min-width: 32em) { | |
%button-coffee { | |
@include button-base; | |
@include button-colors($button-color: #c0ffee); | |
} | |
} | |
%full-width { | |
width: 100%; | |
} | |
@media (min-width: 32em) { | |
%full-width { | |
width: 100%; | |
} | |
} | |
input[type="submit"] { | |
@extend %button; | |
} | |
input[type="reset"] { | |
@extend %button; | |
} | |
button { | |
@extend %button; | |
@media (min-width: 32em) { | |
@extend %button-coffee; | |
} | |
} | |
.cta { | |
input[type="submit"] { | |
@extend %button-cta; | |
} | |
@media (min-width: 32em) { | |
@extend %button-coffee; | |
@extend %full-width; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type="submit"], input[type="reset"], button { | |
border-radius: 0.2em; | |
border-width: 1px; | |
border-style: solid; | |
font-family: sans-serif; | |
font-weight: normal; | |
font-size: 0.9rem; | |
line-height: 1.25; | |
text-transform: uppercase; | |
padding: 0.2em 0.5em; | |
color: #2d2d2d; | |
background-color: #ececec; | |
border-color: lightgrey; | |
text-shadow: white 1px 1px 0; | |
} | |
input[type="submit"]:hover, input[type="reset"]:hover, button:hover { | |
background-color: #f9f9f9; | |
} | |
input[type="submit"]:active, input[type="reset"]:active, button:active { | |
background-color: white; | |
} | |
.cta input[type="submit"] { | |
color: #2d2d2d; | |
background-color: #bada55; | |
border-color: #a8cf2d; | |
text-shadow: #d3e894 1px 1px 0; | |
} | |
.cta input[type="submit"]:hover { | |
background-color: #c2df6a; | |
} | |
.cta input[type="submit"]:active { | |
background-color: #cbe37f; | |
} | |
@media (min-width: 32em) { | |
button, .cta { | |
border-radius: 0.2em; | |
border-width: 1px; | |
border-style: solid; | |
font-family: sans-serif; | |
font-weight: normal; | |
font-size: 0.9rem; | |
line-height: 1.25; | |
text-transform: uppercase; | |
padding: 0.2em 0.5em; | |
color: #2d2d2d; | |
background-color: #c0ffee; | |
border-color: #8dffe0; | |
text-shadow: white 1px 1px 0; | |
} | |
button:hover, .cta:hover { | |
background-color: #dafff5; | |
} | |
button:active, .cta:active { | |
background-color: #f3fffc; | |
} | |
} | |
@media (min-width: 32em) { | |
.cta { | |
width: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment