-
-
Save neonxp/c1b06c0a54cbf16e82c0e505284702de to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/zijekabeni
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.button { | |
background-color: #eaeaea; | |
border: 1px solid #e7e7e7; | |
display: inline-block; | |
transition: background-color 0.1s linear; | |
border-radius: 4px; | |
padding: 6px 8px; | |
min-width: 100px; | |
font-size: 12px; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
color: #3a3a3a; | |
text-decoration: none; | |
text-align: center; | |
} | |
.button:active { | |
background-color: #dbdbdb; | |
} | |
.button--primary { | |
background-color: #286aa8; | |
border: 1px solid #296dac; | |
color: #ffffff; | |
} | |
.button--primary:active { | |
background-color: #2e7ac1; | |
} | |
.button--success { | |
background-color: #28a86a; | |
border: 1px solid #29ac6d; | |
color: #ffffff; | |
} | |
.button--success:active { | |
background-color: #2ec17a; | |
} | |
.button--warning { | |
background-color: #f0ea3a; | |
border: 1px solid #f0e935; | |
color: #3a3a3a; | |
} | |
.button--warning:active { | |
background-color: #eee71e; | |
} | |
.button--danger { | |
background-color: #ff3a3a; | |
border: 1px solid #ff3f3f; | |
color: #ffffff; | |
} | |
.button--danger:active { | |
background-color: #ff5959; | |
} | |
</style> | |
</head> | |
<body> | |
<a href="#" class="button">Default</a> | |
<a href="#" class="button button--primary">Primary</a> | |
<a href="#" class="button button--success">Success</a> | |
<a href="#" class="button button--warning">Warning</a> | |
<a href="#" class="button button--danger">Danger</a> | |
<script id="jsbin-source-css" type="text/css">@primaryBackgroundColor: #286aa8; | |
@primaryForegroundColor: #ffffff; | |
@successBackgroundColor: #28a86a; | |
@successForegroundColor: #ffffff; | |
@warningBackgroundColor: #f0ea3a; | |
@warningForegroundColor: #3a3a3a; | |
@dangerBackgroundColor: #ff3a3a; | |
@dangerForegroundColor: #ffffff; | |
@backgroundColor: #eaeaea; | |
@foregroundColor: #3a3a3a; | |
.button { | |
background-color: @backgroundColor; | |
border: 1px solid darken(@backgroundColor, 1); | |
&:active { | |
background-color: darken(@backgroundColor, 6) | |
} | |
display: inline-block; | |
transition: background-color .1s linear; | |
border-radius: 4px; | |
padding: 6px 8px; | |
min-width: 100px; | |
font-size: 12px; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
color: @foregroundColor; | |
text-decoration: none; | |
text-align: center; | |
} | |
.button--primary { | |
background-color: @primaryBackgroundColor; | |
border: 1px solid lighten(@primaryBackgroundColor, 1); | |
&:active { | |
background-color: lighten(@primaryBackgroundColor, 6) | |
} | |
color: @primaryForegroundColor; | |
} | |
.button--success { | |
background-color: @successBackgroundColor; | |
border: 1px solid lighten(@successBackgroundColor, 1); | |
&:active { | |
background-color: lighten(@successBackgroundColor, 6) | |
} | |
color: @successForegroundColor; | |
} | |
.button--warning { | |
background-color: @warningBackgroundColor; | |
border: 1px solid darken(@warningBackgroundColor, 1); | |
&:active { | |
background-color: darken(@warningBackgroundColor, 6) | |
} | |
color: @warningForegroundColor; | |
} | |
.button--danger { | |
background-color: @dangerBackgroundColor; | |
border: 1px solid lighten(@dangerBackgroundColor, 1); | |
&:active { | |
background-color: lighten(@dangerBackgroundColor, 6) | |
} | |
color: @dangerForegroundColor; | |
}</script> | |
</body> | |
</html> |
This file contains 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
.button { | |
background-color: #eaeaea; | |
border: 1px solid #e7e7e7; | |
display: inline-block; | |
transition: background-color 0.1s linear; | |
border-radius: 4px; | |
padding: 6px 8px; | |
min-width: 100px; | |
font-size: 12px; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
color: #3a3a3a; | |
text-decoration: none; | |
text-align: center; | |
} | |
.button:active { | |
background-color: #dbdbdb; | |
} | |
.button--primary { | |
background-color: #286aa8; | |
border: 1px solid #296dac; | |
color: #ffffff; | |
} | |
.button--primary:active { | |
background-color: #2e7ac1; | |
} | |
.button--success { | |
background-color: #28a86a; | |
border: 1px solid #29ac6d; | |
color: #ffffff; | |
} | |
.button--success:active { | |
background-color: #2ec17a; | |
} | |
.button--warning { | |
background-color: #f0ea3a; | |
border: 1px solid #f0e935; | |
color: #3a3a3a; | |
} | |
.button--warning:active { | |
background-color: #eee71e; | |
} | |
.button--danger { | |
background-color: #ff3a3a; | |
border: 1px solid #ff3f3f; | |
color: #ffffff; | |
} | |
.button--danger:active { | |
background-color: #ff5959; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment