Skip to content
Snippets Groups Projects
hy-content-list-item.scss 4.04 KiB
Newer Older
:host {
  background: radial-gradient(circle, #f8f8f8 0%, #f5f5f5 100%);
  cursor: pointer;
  display: flex;
  margin-bottom: 16px;
  position: relative;

  @include breakpoint($narrow) {
    margin-bottom: 24px;
  }
}
:host(.row) {
  max-width: 100%;
  padding: 21px 0 60px 12px;
  width: 100%;

  @include breakpoint($narrow) {
    padding: 21px 0 12px 24px;
  }
  @include breakpoint($wide) {
    margin-bottom: 16px;
  }
}
:host(.grid) {
  max-width: 100%;
  padding: 21px 0 60px 12px;
  width: 100%;

  @include breakpoint($narrow) {
    margin-right: var(--gutter-medium);
    max-width: calc(((100% - #{var(--gutter-medium)} * 11) / 12) * 6 + #{var(--gutter-medium)} * 5);
    padding: 21px 0 60px 12px;
    width: calc(((100% - #{var(--gutter-medium)} * 11) / 12) * 6 + #{var(--gutter-medium)} * 5);
  }
  @include breakpoint($wide) {
    margin-bottom: 27px;
    margin-right: var(--gutter-wide);
    max-width: calc(((100% - #{var(--gutter-wide)} * 11) / 12) * 4 + #{var(--gutter-wide)} * 3);
    width: calc(((100% - #{var(--gutter-wide)} * 11) / 12) * 4 + #{var(--gutter-wide)} * 3);
  }
  @include breakpoint($extrawide) {
    margin-bottom: 32px;
    margin-right: var(--gutter-extrawide);
    max-width: calc(((100% - #{var(--gutter-extrawide)} * 11) / 12) * 4 + #{var(--gutter-extrawide)} * 3);
    width: calc(((100% - #{var(--gutter-extrawide)} * 11) / 12) * 4 + #{var(--gutter-extrawide)} * 3);
  }
}

:host(.grid:nth-of-type(2n + 0)) {
  @include breakpoint($narrow) {
    margin-right: 0;
  }
  @include breakpoint($wide) {
    margin-right: var(--gutter-wide);
  }
  @include breakpoint($extrawide) {
    margin-right: var(--gutter-extrawide);
  }
}

:host(.grid:nth-of-type(3n + 0)) {
  @include breakpoint($wide) {
    margin-right: 0;
  }
}

.hy-content-list-item {
  font-family: var(--main-font-family);
  position: relative;
  width: 100%;

  a {
    text-decoration: none;
  }

  &--container {
    cursor: pointer;
  }

  &--item-name {
    color: var(--link-blue);
    @include font-size(20px, 24px);
    @include font-weight($bold);
    letter-spacing: -0.6px;
    margin-bottom: 16px;
  }

  &--metadata {
    @include font-size(14px, 16px);
    @include font-weight($semibold);

    color: var(--grayscale-black);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    letter-spacing: -0.44px;
    line-height: 16px;
    margin-bottom: 19px;
    padding-bottom: 0;

    @include breakpoint($narrow) {
      padding-bottom: 1rem;
    }
    @include breakpoint($extrawide) {
      padding-bottom: 0;
    }

    &--item:after {
      content: '|';
      padding: 0 8px;
    }
    &--item--last:after {
      content: ' ';
    }
  }

  &--link {
    position: absolute;
    right: -6px;

    a {
      align-items: center;
      display: flex;
      flex-direction: row;
      text-decoration: none;

      .label {
        @include font-size(16px, 16px);
        @include font-weight($bold);
        color: var(--link-blue);
        letter-spacing: -0.5px;
        line-height: 16px;
        margin-right: 8px;
        text-align: right;
      }

      .icon-wrapper {
        background-color: var(--brand-main-light);
        z-index: 10;

        .icon {
          transform: rotate(-45deg);
          position: relative;
          overflow: hidden;

          svg {
            background-color: transparent;
            box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
            fill: var(--grayscale-white);
            padding: 10.29px;
          }
        }
      }
    }
  }
}

.hy-content-list-item.row {
  .hy-content-list-item--link {
    bottom: -60px;
    padding-bottom: 12px;

    @include breakpoint($narrow) {
      bottom: 0;
      padding-bottom: 0;
    }
  }

  .hy-content-list-item--tags {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    @include breakpoint($wide) {
      flex-direction: row;
      padding-right: 200px;
    }
  }
}

.hy-content-list-item.grid {
  .hy-content-list-item--link {
    bottom: -60px;
    padding-bottom: 12px;
  }

  .hy-content-list-item--tags {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }
}