jacobwgillespie/halfstaff

View on GitHub
app/assets/stylesheets/_cards.scss

Summary

Maintainability
Test Coverage
@import 'variables';

.cards {
  margin-top: -80px;
}

.card {
  background-color: $white;
  border-radius: 2px;
  box-shadow: 0 2px 2px 0 $card-shadow-1, 0 3px 1px -2px $card-shadow-2, 0 1px 5px 0 $card-shadow-3;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  margin-bottom: 2em;
  max-width: 440px;
  padding: 6px;

  .title,
  .text,
  .meta,
  .actions {
    padding: 16px;
  }

  .title h3 {
    font-weight: 700;
    line-height: 1em;
  }

  .title h2 {
    font-size: 24px;
    font-weight: 300;
    line-height: 1em;
    margin: 0;
    padding: 0;
  }

  .title a {
    color: inherit;
    text-decoration: none;
  }

  .text,
  .meta {
    color: $card-meta-color;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    width: 90%;
  }

  .text p {
    margin-bottom: 1em;
  }

  .text p:last-child {
    margin-bottom: 0;
  }

  .text a {
    color: $link-color;
  }

  .actions a {
    color: $link-color;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
  }
}

.meta .time {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  div {
    flex: 1 0 50%;
  }

  .label {
    font-weight: 700;
  }
}

.recent .recent-notice {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 1em;

  a {
    color: inherit;
    font-weight: 300;
    text-decoration: none;
  }

  small {
    padding-left: 1em;
    text-align: right;
    white-space: nowrap;
  }
}

@media screen and (min-width: 750px) {
  .cards {
    margin-top: 0;
  }
}