18F/18f.gsa.gov

View on GitHub
_sass/_components/post-list.scss

Summary

Maintainability
Test Coverage
// Post list
// ==========================

.post-list {
  @include unstyled-list;

  h3 {
    font-size: 2.8rem;
    margin-top: 0.5em;
    margin-bottom: $paragraph-margins;

    a {
      color: $color-base;
      text-decoration: none;
      line-height: 1.3;
    }

    + .post-byline {
      margin-top: 0;
      margin-bottom: $paragraph-margins;
    }
  }

  li {
    border-bottom: $border-gray;
    display: inline-block;
    margin-top: 3rem;
    padding-bottom: 3rem;
    margin-bottom: 0;

    &:first-child {
      margin-top: 0;
    }
  }

  .media_link {
    margin-top: $paragraph-margins;
    margin-bottom: $paragraph-margins;

    @include at-media('tablet') {
      float: left;
      margin-top: 0;
    }
  }

  img {
    max-width: 29rem;
    width: 100%;
  }
}

.post-click-target {
  color: $color-black;
  text-decoration: none;

  &:visited,
  &:hover,
  &:focus,
  &:hover:visited,
  &:hover:focus {
    color: $color-black;
    text-decoration: none;
  }

  p {
    color: $color-black;
    text-decoration: none;
  }
}

// a two-thirds wide excerpt is preceded by an image thumbnail. Pad the thumbnail.
.usa-width-two-thirds .post-click-target p {
  margin-left: $paragraph-margins;
}