Skip to content
Snippets Groups Projects
menu-item.scss 7.6 KiB
Newer Older
  • Learn to ignore specific revisions
  • // Mobile.
    :host(.hy-menu-item--mobile) {
    
      --menu-item-display: flex;
    
      display: flex;
      margin-left: 12px;
      margin-right: 12px;
      margin: 0 12px 5px;
    
      @include breakpoint($narrow) {
        margin: 0 28px 6px;
      }
    
    :host(.hy-menu-item--mobile.hy-menu-item--alternative) {
    
    :host(.hy-menu-item--mobile:last-of-type) {
      border-bottom: 0 none;
    }
    
    :host(.hy-menu-item--mobile.is-hidden) {
      visibility: hidden !important;
    
      &:focus {
        outline: none;
      }
    }
    
    
    :host(.hy-menu-item--mobile[depth='1']:not(.hy-menu-item--alternative)) a {
    
      @include font-weight($bold);
    }
    
    // Desktop.
    
    druid's avatar
    druid committed
    :host(.hy-menu-item--desktop.hy-menu-item--for-desktop) {
      display: block;
      visibility: visible;
    }
    
    :host(.hy-menu-item--desktop:not(.hy-menu-item--for-desktop)) {
      display: none;
      visibility: hidden;
    }
    
    /*
    
    :host(.hy-menu-item--desktop.is-hidden) {
      height: auto;
      visibility: visible !important;
    }
    
    druid's avatar
    druid committed
     */
    
    druid's avatar
    druid committed
    :host(.hy-menu-item--for-desktop[depth='1']) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        @include breakpoint($extrawide) {
          @include font-size(24px, 32px);
          background-color: var(--grayscale-background-box);
          letter-spacing: -0.75px;
          margin-bottom: 4px;
          padding-left: 32px;
          padding-right: 32px;
          padding-top: 5px;
          position: relative;
          text-transform: none;
        }
        @include breakpoint($fullhd) {
          @include font-size(26px, 32px);
          letter-spacing: -0.81px;
          margin-bottom: 6px;
          padding-top: 19px;
        }
    
    
        .hy-menu-item__label {
          border: none;
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
          margin-left: 14px;
        }
    
        span.hy-menu-item__heading__icon {
          position: absolute;
          top: 12px;
          left: -6px;
    
          @include breakpoint($fullhd) {
            top: 27px;
          }
    
          svg {
            background-color: var(--brand-main-light);
            fill: var(--grayscale-white);
            padding: 8px;
          }
    
    druid's avatar
    druid committed
    
    :host(.hy-menu-item--for-desktop[depth='2']) {
    
    Ekaterina Kondareva's avatar
    Ekaterina Kondareva committed
        @include breakpoint($extrawide) {
          @include font-size(15px, 22px);
          letter-spacing: -0.47px;
          padding-left: 24px;
          padding-right: 24px;
          text-transform: none;
        }
    
        @include breakpoint($fullhd) {
          @include font-size(18px, 22px);
          letter-spacing: -0.56px;
        }
    
        .hy-menu-item__label {
          border: none;
          margin-left: 12px;
        }
    
        span.hy-menu-item__heading__icon {
          svg {
            fill: var(--brand-main-light);
            @include breakpoint($extrawide) {
              padding: 1px 0;
            }
          }
        }
    
    druid's avatar
    druid committed
    :host(.hy-menu-item--for-desktop:not([depth='2']):not([depth='1'])) {
      a {
        display: none;
      }
    
    druid's avatar
    druid committed
    :host(.hy-menu-item.hy-menu-item--for-desktop) {
    
      border: 0 none;
    
    druid's avatar
    druid committed
      //--menu-item-display: none;
      a {
    
    druid's avatar
    druid committed
        align-items: center;
        color: var(--brand-main-nearly-black);
        display: flex;
        font-family: var(--main-font-family);
        text-decoration: none;
        width: 100%;
    
    druid's avatar
    druid committed
        &:focus {
          outline: solid 2px var(--additional-yellow);
          outline-offset: -2px;
        }
        .hy-menu-item__label {
          @include breakpoint($extrawide) {
            padding-top: 12px;
            padding-bottom: 12px;
          }
        }
    
    druid's avatar
    druid committed
      a.is-heading {
        display: none;
      }
      button {
        display: none;
    
    // Sidenav.
    :host(.hy-menu-item--sidenav) {
      display: flex;
      flex-flow: column;
    
      --hy-menu-item-sidenav-display: block;
    
    :host(.hy-menu-item--sidenav.is-hidden--child) {
    
      --hy-menu-item-sidenav-display: none;
    
    :host(.hy-menu-item--sidenav:not(.is-parent)) {
      display: none;
      visibility: hidden;
    
    :host(.hy-menu-item--sidenav.is-active) {
      display: block;
      visibility: visible;
    
    :host(.hy-menu-item--sidenav.is-active--child) {
      display: block;
      visibility: visible;
    
    :host(.hy-menu-item--sidenav.in-active-trail) {
      display: block;
      visibility: visible;
    
    druid's avatar
    druid committed
    :host(.hy-menu-item:not(.hy-menu-item--for-desktop)) {
      a {
        @include font-size(15px, 20px);
        @include font-weight($regular);
        align-items: center;
        color: var(--brand-main-nearly-black);
        display: flex;
        font-family: var(--main-font-family);
        padding: 24px 16px;
        text-decoration: none;
        width: 100%;
    
    druid's avatar
    druid committed
        &:focus {
          outline: solid 2px var(--additional-yellow);
          outline-offset: -2px;
    
    druid's avatar
    druid committed
        &.hy-menu-item--mobile {
          background: linear-gradient(270deg, var(--grayscale-background-box) 0%, var(--grayscale-light) 100%);
    
          color: var(--brand-main-light);
    
    druid's avatar
    druid committed
          padding: 12px 12px 12px 20px;
    
    
          &.is-active,
          &.in-active-trail {
            @include font-weight($bold);
            color: var(--grayscale-black);
            position: relative;
    
            &:before {
    
    druid's avatar
    druid committed
              border-left: 3px solid var(--grayscale-black);
              content: '';
              height: 75%;
              left: 10px;
              position: absolute;
              top: 50%;
              transform: translate(-50%, -50%);
    
    druid's avatar
    druid committed
          &.is-heading {
            @include font-size(24px, 24px);
            @include font-weight($bold);
            background: transparent;
            border-bottom: 3px solid var(--brand-main-light);
            color: var(--brand-main-light);
            margin-top: -24px;
            padding-bottom: 24px;
            padding-top: 24px;
            text-transform: uppercase;
    
            &.is-active,
            &.in-active-trail {
              @include font-weight($bold);
              color: var(--grayscale-black);
              position: relative;
    
              &:before {
                border-left-width: 4px;
                height: 55%;
              }
            }
          }
    
    druid's avatar
    druid committed
        &.is-heading {
          display: inherit;
          @include breakpoint($extrawide) {
            display: none;
          }
    
    druid's avatar
    druid committed
        &.hy-menu-item--sidenav {
          @include font-size(18px, 24px);
          @include font-weight($bold);
          color: var(--brand-main-light);
          display: var(--hy-menu-item-sidenav-display);
          font-family: var(--main-font-family);
          margin: 10px 0;
          padding: 8px 0;
    
    druid's avatar
    druid committed
          &:focus {
            outline-offset: 4px;
    
    druid's avatar
    druid committed
          &:hover {
            color: var(--brand-main-nearly-black);
    
    druid's avatar
    druid committed
          &.is-active {
            color: var(--brand-main-nearly-black);
            text-decoration: none;
    
    druid's avatar
    druid committed
            .hy-menu-item__label {
              padding-bottom: 0;
    
    druid's avatar
    druid committed
          &.is-active--heading {
            @include font-size(26px, 40px);
            color: var(--brand-main-nearly-black);
            text-transform: uppercase;
    
    druid's avatar
    druid committed
            .hy-menu-item__label {
              border-bottom: 4px solid var(--brand-main-nearly-black);
              padding: 0;
    
    druid's avatar
    druid committed
              &__icon {
                display: none;
              }
            }
    
    druid's avatar
    druid committed
          &.is-active--child {
            color: var(--brand-main-light);
            text-decoration: none;
          }
    
    druid's avatar
    druid committed
          .hy-menu-item__label__icon {
            color: var(--brand-main-light);
            display: inline-block;
            padding-left: 5px;
    
    druid's avatar
    druid committed
            .is-active & {
    
    druid's avatar
    druid committed
          &.is-parent {
            @include font-size(16px, 22px);
            @include font-weight($semibold);
            align-items: center;
            color: var(--brand-main-light);
            display: flex;
            text-decoration: none;
    
    druid's avatar
    druid committed
            &:hover {
    
              color: var(--brand-main-nearly-black);
    
    druid's avatar
    druid committed
              .hy-menu-item__label__icon {
                color: var(--brand-main-nearly-black);
              }
    
    druid's avatar
    druid committed
            .hy-menu-item__label__icon {
              margin-right: 8px;
            }
    
      background: linear-gradient(270deg, var(--grayscale-background-box) 0%, var(--grayscale-light) 100%);
    
      border-bottom: 0;
      border-left: 1px dashed var(--brand-main-light);
      border-right: 0;
      border-top: 0;
    
      display: var(--menu-item-display);
    
      padding: 0;
      width: 50px;
    
      svg {
        fill: var(--brand-main-light);