Skip to content
Snippets Groups Projects
link-box.scss 8.77 KiB
Newer Older
  • Learn to ignore specific revisions
  • :host {
    
      background: var(--grayscale-background-box);
    
      display: flex;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      margin-right: 0;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      max-width: 100%;
    
      position: relative;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      width: 100%;
    
      @include breakpoint($narrow) {
        margin-right: var(--gutter-narrow);
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      }
      @include breakpoint($wide) {
        margin-right: var(--gutter-wide);
      }
      @include breakpoint($extrawide) {
        margin-right: var(--gutter-extrawide);
      }
    }
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
    :host(.big) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      display: flex;
    
      @include breakpoint($narrow) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        flex-grow: 1;
    
    druid's avatar
    druid committed
        max-width: calc(((100% - #{var(--gutter-narrow)} * 11) / 12) * 6 + #{var(--gutter-narrow)} * 5);
        width: calc(((100% - #{var(--gutter-narrow)} * 11) / 12) * 6 + #{var(--gutter-narrow)} * 5);
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      }
      @include breakpoint($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) {
        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);
      }
    }
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
    :host(.small) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      display: flex;
    
      @include breakpoint($narrow) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        flex-grow: 1;
    
        max-width: calc(((100% - #{var(--gutter-narrow)} * 11) / 12) * 6 + #{var(--gutter-narrow)} * 5);
        width: calc(((100% - #{var(--gutter-narrow)} * 11) / 12) * 6 + #{var(--gutter-narrow)} * 5);
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      }
      @include breakpoint($wide) {
        max-width: calc(((100% - #{var(--gutter-wide)} * 11) / 12) * 3 + #{var(--gutter-wide)} * 2);
        width: calc(((100% - #{var(--gutter-wide)} * 11) / 12) * 3 + #{var(--gutter-wide)} * 2);
      }
      @include breakpoint($extrawide) {
        max-width: calc(((100% - #{var(--gutter-extrawide)} * 11) / 12) * 3 + #{var(--gutter-extrawide)} * 2);
        width: calc(((100% - #{var(--gutter-extrawide)} * 11) / 12) * 3 + #{var(--gutter-extrawide)} * 2);
      }
    }
    
    druid's avatar
    druid committed
    
    
    druid's avatar
    druid committed
    :host(.content.big:nth-of-type(3n + 0)) {
      @include breakpoint($wide) {
        display: flex;
        margin-right: 0;
      }
    
    druid's avatar
    druid committed
    :host(:nth-of-type(2n + 0)) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      display: flex;
    
    druid's avatar
    druid committed
      margin-right: 0;
    
      @include breakpoint($narrow) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        margin-right: 0;
      }
      @include breakpoint($wide) {
        margin-right: var(--gutter-wide);
      }
      @include breakpoint($extrawide) {
        margin-right: var(--gutter-extrawide);
      }
    }
    
    :host(.small:nth-of-type(4n + 0)) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      display: flex;
    
      @include breakpoint($narrow) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        margin-right: 0;
      }
    }
    
    :host(:last-of-type) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      display: flex;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
      margin-right: 0;
    }
    
    
    druid's avatar
    druid committed
    .hy-link-box-container {
      position: relative;
      width: 100%;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
    
    
    druid's avatar
    druid committed
      &:hover {
        cursor: pointer;
    
    druid's avatar
    druid committed
    }
    
    druid's avatar
    druid committed
    .hy-link-box {
    
      &__image-container {
        display: flex;
        justify-content: stretch;
        margin-bottom: 0;
        min-height: 10rem;
        position: relative;
    
        &:before {
    
          display: block;
          padding-top: (10 / 16) * 100%;
          width: 100%;
        }
    
        > img {
          bottom: 0;
          height: 100%;
          left: 0;
          object-fit: cover;
          position: absolute;
          right: 0;
          top: 0;
          width: 100%;
        }
      }
    
    
    druid's avatar
    druid committed
      // Front and Landing pages
      &__landing {
        .hy-link-box__text-container {
          margin-bottom: 60px;
          padding: 0 12px;
    
          @include breakpoint($narrow) {
            padding: 0 16px;
          }
          @include breakpoint($wide) {
            padding: 0 12px;
          }
          @include breakpoint($xlarge) {
            padding: 0 16px;
          }
    
          &__title {
            @include font-size(22px, 28px);
            @include font-weight($bold);
            color: var(--brand-main-nearly-black);
            font-family: var(--main-font-family);
            letter-spacing: -0.6px;
            margin-bottom: 8px;
            // Margin if there is no image above the title
    
    druid's avatar
    druid committed
            margin-top: 20px;
            // Margin if there is an image above the title
    
    druid's avatar
    druid committed
            &__image {
              margin-top: 16px;
            }
    
            @include breakpoint($narrow) {
              @include font-size(24px, 30px);
              color: var(--grayscale-black);
              letter-spacing: -0.7px;
            }
            @include breakpoint($wide) {
              margin-top: 24px;
              &__image {
                margin-top: 18px;
              }
            }
            @include breakpoint($extrawide) {
              // with sidebar
              &__common {
                @include font-size(24px, 30px);
                letter-spacing: -0.7px;
              }
              // without sidebar
              &__large {
                @include font-size(28px, 36px);
                letter-spacing: -0.8px;
                margin-bottom: 12px;
                margin-top: 32px;
              }
              &__large.image {
                // Margin if there is an image above the title
                margin-top: 20px;
              }
            }
            @include breakpoint($xlarge) {
              // Both with and without sidebar
              @include font-size(28px, 36px);
              letter-spacing: -0.8px;
              margin-bottom: 12px;
              // Margin if there is no image above the title
    
    druid's avatar
    druid committed
              margin-top: 32px;
              // Margin if there is an image above the title
    
    druid's avatar
    druid committed
              &__image {
                margin-top: 20px;
              }
            }
          }
    
          &__description {
            @include font-size(14px, 18px);
            color: var(--grayscale-dark);
            font-family: var(--main-font-family);
            letter-spacing: -0.2px;
            margin-bottom: 12px;
    
            @include breakpoint($extrawide) {
              // with sidebar
              &__common {
                @include font-size(14px, 18px);
                letter-spacing: -0.2px;
              }
              // without sidebar
              &__large {
                @include font-size(16px, 22px);
                letter-spacing: -0.2px;
              }
            }
            @include breakpoint($xlarge) {
              // Both with and without sidebar
              @include font-size(16px, 22px);
              letter-spacing: -0.2px;
            }
          }
    
    druid's avatar
    druid committed
      }
    
      // Content pages
      &__content {
        .hy-link-box__text-container {
          margin-bottom: 60px;
          padding: 0 12px;
    
          @include breakpoint($narrow) {
            padding: 0 16px;
          }
          @include breakpoint($wide) {
            padding: 0 12px;
          }
    
          &__title {
            @include font-size(18px, 22px);
            @include font-weight($bold);
            color: var(--brand-main-nearly-black);
            font-family: var(--main-font-family);
            letter-spacing: -0.5px;
            margin-bottom: 8px;
    
    druid's avatar
    druid committed
            // Margin if there is no image above the title
            margin-top: 24px;
            // Margin if there is an image above the title
            &__image {
              margin-top: 20px;
            }
    
    druid's avatar
    druid committed
    
    
    druid's avatar
    druid committed
            @include breakpoint($wide) {
              // Margin if there is an image above the title
              &__image {
                margin-top: 16px;
              }
            }
    
    druid's avatar
    druid committed
            @include breakpoint($extrawide) {
              // with sidebar
              &__common {
                @include font-size(18px, 22px);
                letter-spacing: -0.5px;
              }
              // without sidebar
              &__large {
                @include font-size(20px, 24px);
                letter-spacing: -0.6px;
                margin-bottom: 12px;
    
    druid's avatar
    druid committed
                // Margin if there is no image above the title
                margin-top: 32px;
                // Margin if there is an image above the title
                &__image {
                  margin-top: 20px;
                }
    
    druid's avatar
    druid committed
              }
            }
            @include breakpoint($xlarge) {
              // both with and without sidebar
              @include font-size(20px, 24px);
              letter-spacing: -0.6px;
              margin-bottom: 12px;
    
    druid's avatar
    druid committed
              // Margin if there is no image above the title
              margin-top: 32px;
              // Margin if there is an image above the title
              &__image {
                margin-top: 20px;
              }
    
    druid's avatar
    druid committed
            }
          }
    
          &__description {
            @include font-size(14px, 18px);
            color: var(--grayscale-dark);
            font-family: var(--main-font-family);
            letter-spacing: -0.2px;
            margin-bottom: 10px;
          }
    
    druid's avatar
    druid committed
    
      // General styles for title
      .hy-link-box__text-container {
        &__title {
          &__hover {
            color: var(--brand-main);
            text-decoration: underline;
          }
        }
      }
    
    .hy-icon-wrapper {
      background-color: var(--brand-main-light);
    
    druid's avatar
    druid committed
      bottom: 12px;
    
      overflow: hidden;
    
    druid's avatar
    druid committed
      position: absolute;
      right: -6px;
    
      z-index: 10;
    
      &__hover {
        background-color: var(--brand-main);
      }
    }
    
    .hy-link-box-link {
      display: block;
    
    druid's avatar
    druid committed
    
      svg {
    
        background-color: transparent;
    
    druid's avatar
    druid committed
        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
        fill: var(--grayscale-white);
        height: 32px;
        padding: 6px;
        width: 32px;
      }
    
    
      &__external {
        transform: rotate(-45deg);
    
    druid's avatar
    druid committed
      }
    
    
    druid's avatar
    druid committed
      @include breakpoint($extrawide) {
        // without sidebar, Landing MAJOR variation only
        &__landing.large {
          svg {
            height: 40px;
            padding: 8px;
            width: 40px;
          }
    
    druid's avatar
    druid committed
      }
      @include breakpoint($xlarge) {
        // MAJOR (Landing and Front pages)
        &__landing {
          svg {
            height: 40px;
            padding: 8px;
            width: 40px;
          }