eiriksm/commit-a-day

View on GitHub
static/scss/style.scss

Summary

Maintainability
Test Coverage
@import "reset";
@import "animate";

$primary: #00303E;
$background: #7096AD;
$error: #EC4911;
$text-color: #00303E;
* {
  box-sizing: border-box;
}
body {
  background: $background;
  font-family: Lato, sans-serif;
  color: $text-color;
}

input, button {
  padding: 10px 0;
  border: 4px solid #eee;
  font-family: Lato, sans-serif;
  font-size: 25px;
}

button {
  // Yeah, borrowed directly from bootstrap.
  background: $primary;
  color: #fff;
  display: block;
  margin-bottom: 0; // For input.btn
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  white-space: nowrap;
  border-color: darken($primary, 10%);

  &:active,
  &.active {
    outline: 0;
    background-image: none;
  }

  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    cursor: not-allowed;
    pointer-events: none; // Future-proof disabling of clicks
  }
}

.content-container {
  background: #f5f5f7;
  width: 600px;
  max-width: 100%;
  margin: auto;
  padding: 10px;
}
@media (max-width: 600px) {
  .content-container {
    width: 90%;
  }
}
.site-title {
  text-align: center;
  margin: auto;
  margin-top: 20px;
  color: #fff;
  text-shadow: 0 0 5px $primary;
  margin-bottom: 20px;
}
.description-container {
  @extend .content-container;
  margin-top: 20px;
}
p {
  text-align: left;
}
pre {
  // Used for code.
  background: #000;
  color: #fff;
  text-align: left;
  white-space: normal;
  padding: 10px;
}
.content {
  margin: 1em 0;
}

.username-input {
  display: block;
  transition: border-color .3s ease;
  &:focus {
    border-color: #aaa;
    outline: 0;
  }
}

.username-input,
.action-button {
  width: 100%;
}
.action-button {
  text-align: center;
}
.suggestion-wrapper {
  background: #fff;
}
.suggestion {
  padding: 10px;
  border: 1px solid $primary;
}
.errors {
  padding: 10px;
  background: $error;
  color: #fff;
}
.loading-spinner-holder {
  opacity: .9;
  width: 100%;
  height: 58px;
  span {
    height: 25px;
  }
  i {
    background: $primary;
    width: 20px;
    height: 20px;
    display: inline-block;
    opacity: 1;
    &.dot-3 {
      clear: both;
    }
  }
  @for $i from 1 through 4 {
    .dot-#{$i} {
      animation: load .3s linear .1s*$i infinite alternate;
    }
  }
  .inner {
    margin: 0 auto;
    text-align: center;
    z-index: 99999;
    position: relative;
  }
}

@keyframes load {
  100% {
    background: $background;
  }
}
h1, h2 {
  text-shadow: 0 0 2px #fff;
}
p {
  margin: 1em 0;
  line-height: 1.667em;
}
a,
a:active,
a:visited {
  color: $primary;
}