18F/18f.gsa.gov

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

Summary

Maintainability
Test Coverage
// Post feature
// ==========================
.posts_feature {
  > ul {
    @include unstyled-list;
  }

  .post-excerpt {
    font-size: 1.7rem;
    @include u-line-height('body', 3);
  }

  article {
    border-top: $border-accent;
    margin-bottom: $theme-site-margins-width;
    padding-top: 1rem;

    @include at-media('tablet') {
      margin-bottom: 0;
    }

    a {
      text-decoration: none;
    }
  }

  .post {
    margin-bottom: $paragraph-margins;

    &:last-of-type {
      margin-bottom: 0;
    }

    @include at-media('tablet') {
      margin-bottom: 0;
    }
  }
}

.posts_feature-heading {
  margin-top: 0;

  a {
    color: $color-base;
    @include u-line-height('body', 3);
  }
}

.post-date,
time {
  font-weight: normal;
  font-size: $h5-font-size;
  color: color('gray-cool-60');
  margin-bottom: 1em;
}

.post-byline {
  + .post-date,
  + time {
    white-space: nowrap;
    margin-bottom: $paragraph-margins-thick;

    &::before {
      content: '\2022';
      height: 1em;
      width: 1em;
      margin-right: 1rem;
      margin-left: $spacer-margins; // to accommodate for adjoning p margin
      color: color('gray-cool-60');
      font-size: 0.8em;
    }
  }
}

.post-border {
  border-bottom: $border-accent-medium;
  padding-bottom: $paragraph-margins;
}