Skip to content

Instantly share code, notes, and snippets.

Created January 26, 2017 08:29
Show Gist options
  • Save anonymous/35b6aea8fd0558e24602e598448f673f to your computer and use it in GitHub Desktop.
Save anonymous/35b6aea8fd0558e24602e598448f673f to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/darexixedu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.button {
display: inline-block;
background-color: #286aa8;
transition: background-color 0.1s linear;
border: 1px solid #296dac;
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: #ffffff;
text-decoration: none;
text-align: center;
}
.button:active {
background-color: #2e7ac1;
}
</style>
</head>
<body>
<a href="#" class="button">Hello, world</a>
<script id="jsbin-source-css" type="text/css">@backgroundColor: #286aa8;
@foregroundColor: #ffffff;
.button {
display: inline-block;
background-color: @backgroundColor;
transition: background-color .1s linear;
border: 1px solid lighten(@backgroundColor, 1);
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;
&:active {
background-color: lighten(@backgroundColor, 6)
}
}</script>
</body>
</html>
.button {
display: inline-block;
background-color: #286aa8;
transition: background-color 0.1s linear;
border: 1px solid #296dac;
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: #ffffff;
text-decoration: none;
text-align: center;
}
.button:active {
background-color: #2e7ac1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment