Skip to content

Instantly share code, notes, and snippets.

@mattcdavis1
Last active April 3, 2018 03:07
Show Gist options
  • Save mattcdavis1/445e86381b66c371583888640152f95f to your computer and use it in GitHub Desktop.
Save mattcdavis1/445e86381b66c371583888640152f95f to your computer and use it in GitHub Desktop.
.alert {
border: 1px solid transparent;
border-radius: .25rem;
display: flex;
left: 0;
margin-bottom: 1rem;
padding: .75rem 1.25rem;
position: fixed;
position: relative;
right: 0;
top: 0;
z-index: 3;
&--success {
background-color: lighten( $accent-color, 10% );
border-color: $accent-color;
color: $button-text-color;
}
&--warning {
background-color: lighten( $warning-color, 10% );
border-color: $warning-color;
color: #856404;
}
}
.btn {
border: 1px solid transparent;
border-radius: .25rem;
cursor: pointer;
display: inline-block;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
padding: .375rem .75rem;
text-align: center;
white-space: nowrap;
&--success {
background-color: lighten( $accent-color, 10% );
border-color: $accent-color;
color: #fff;
}
}
.container {
display: grid;
grid-gap: 1rem;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(2, minmax(15rem, auto));
margin: auto;
max-width: $container-width;
padding: 2rem;
&__card {
align-items: center;
background: $card-bg;
border: 4px solid #eee;
border-radius: 3px;
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
color: $card-text-color;
cursor: pointer;
display: flex;
justify-content: center;
transform: perspective(1px) translateZ(0);
transition-duration: 0.3s;
transition-property: transform;
&:hover {
background: lighten( $accent-color, 10% );
border-color: $accent-color;
color: $card-hover-text-color;
outline: none;
transform: scale(1.1);
}
&--value {
font-size: $card-font-size;
span {
color: $card-hover-text-color;
}
}
}
&__winner {
align-items: center;
background: lighten( $accent-color, 10% );
border-color: $accent-color;
color: $winner-text-color;
display: flex;
font-size: $card-font-size;
grid-column: 1/-1;
justify-content: center;
}
}
body {
background: $body-bg;
font: 18px/30px Lato, sans-serif;
}
.navbar {
align-items: center;
background: $white;
border-bottom: 4px solid #eee;
display: flex;
justify-content: space-between;
padding: 1rem;
&__logo {
background: $accent-color;
border-radius: 50%;
color: white;
font-size: 30px;
font-weight: bold;
height: 50px;
line-height: 50px;
text-align: center;
width: 50px;
}
}
$accent-color: #2ecc71;
$body-bg: #f5f5f7;
$button-text-color: $white;
$card-bg: $white;
$card-font-size: 150px;
$card-hover-text-color: $white;
$card-text-color: #8a8a8a;
$container-width: 1280px;
$warning-color: #ffeeba;
$white: #fff;
$winner-text-color: $white;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment