$f-primary_nav-shadow: 0 3px 5px rgba(0, 0, 0, 0.1); $f-primary_nav-main-minheight: 50px; $f-primary_nav-side-width: 320px; $f-primary_nav-side-zindex: $zindex-modal; $f-primary_nav-icon-count_badge-top: 5px; $f-primary_nav-icon-count_badge-right: -4px; $f-nav-yellow: #FFD452; $f-nav-icon-hover: #bce5fd; @mixin deals_link_base($link_color: $color-forever_orange) { color: $link_color; &::after { position: relative; top: -5px; right: -2px; font-family: FontAwesome; font-size: $font-size-000; content: '\f005'; } } .f-primary_nav { width: 100%; background-color: #2881B8; /*support store method of affixing*/ &.affix { top: 0; left: 0; z-index: $f-primary_nav-side-zindex; } } .f-primary_nav-main { display: flex; height: $f-primary_nav-main-minheight; min-height: $f-primary_nav-main-minheight; box-shadow: $f-primary_nav-shadow; padding-left: 10px; padding-right: 10px; position: relative; z-index: $zindex-navbar-fixed; } .f-primary_nav-logo_link { display: flex; align-items: center; > img { height: 22px; width: 138px; max-width: unset; } } .f-primary_nav-ecom_list { display: flex; flex: 1 0 auto; justify-content: center; align-items: stretch; margin: 0; padding: 0; list-style: none; /* we want to ul to remain and flex grow, so just hide the items */ > li { display: none; > a { position: relative; display: flex; align-items: center; padding: 0 8px; font-family: $font-face-semibold; font-size: $font-size-200; color: #fff; text-decoration: none; @include transition_fast(color, background-color); &.f-primary_nav-ecom_link-deals { @include deals_link_base($f-nav-yellow); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); } &::before { position: absolute; z-index: -1; bottom: 0; left: 0; height: 4px; width: 100%; background-color: rgba(0, 0, 0, 0.15); content: ''; transform: scaleX(0); @include transition_fast(transform); } &:hover, &.is-active, &.is-meganav-open { background-color: rgba(0, 0, 0, 0.1); } &.is-active { &::before { transform: scaleX(1); } } } } } .f-primary_nav-icon_list { position: relative; display: flex; align-items: stretch; margin: 0; padding: 0; list-style: none; > li { display: flex; align-items: stretch; font-size: $font-size-450; > a { display: flex; align-items: center; padding: 0 6px; color: #fff; text-decoration: none; @include transition_fast(color); &:hover { color: $f-nav-icon-hover; } > .f-icon { display: flex; } &.f-primary_nav-icon_link-cart { position: relative; .f-primary_nav-icon_link-cart_count { position: absolute; top: $f-primary_nav-icon-count_badge-top; right: $f-primary_nav-icon-count_badge-right; width: 18px; height: 18px; border-radius: $border-radius-xl; background-color: $f-nav-yellow; color: $color-gray-800; font-size: $font-size-000; font-family: $font-face-semibold; display: flex; align-items: center; justify-content: center; pointer-events: none; } } } //this overrides notification dropdown styles and lets nav own these styles, selectors and nesting is necessary for selector specificity .f-primary_nav-icon_notification.f-notification_dropdown { display: flex; align-items: stretch; .f-notification_dropdown-bell { padding: 0 6px; align-items: center; .f-notification_dropdown-bell_icon { color: #fff; } &:hover { .f-notification_dropdown-bell_icon { color: $f-nav-icon-hover; } } .f-notification_dropdown-bell_count { top: $f-primary_nav-icon-count_badge-top; right: $f-primary_nav-icon-count_badge-right; background-color: $f-nav-yellow; color: $color-gray-800; } } } //this is a placeholder div in store that houses an icon for notifications while turbolinks is transitioning. Ensures there is no jumpiness #mars-notifications { padding: 0 6px; align-self: center; .fa { display:flex; } } } } .f-primary_nav-user_list { display: flex; align-items: center; margin: 0; padding-left: 5px; list-style: none; .f-primary_nav-user_link { font-family: $font-face-semibold; text-transform: uppercase; &.btn { padding: 7px; font-size: 12px; height: 30px; } } .f-primary_nav-user_link-signup { &.btn { color: #fff; } } .f-primary_nav-user_link-signin { &.btn { &:link, &:hover, &:active, &:visited { color: #fff; text-decoration: none; } } } } .f-primary_nav-user_item-avatar { /* use below instead of display to hide so we retain padding */ visibility: hidden; width: 0; .avatar { padding: 0; margin-right: 0; border-width: 0; } } .f-primary_nav-user_item-logged_out { display: none; } .f-primary_nav-user_item-side_toggle { cursor: pointer; padding: 10px 10px 10px 5px; margin-right: -10px; span { background-color: #fff; width: 20px; display: block; height: 2px; border-radius: 1px; @include transition_normal(background-color, margin); } span:not(:first-child) { margin-top: 4px; } &:hover { span { background-color: $f-nav-icon-hover; } span:not(:first-child) { margin-top: 6px; } } } .f-primary_nav-side { position: fixed; display: flex; flex-direction: column; overflow: auto; top: 0; right: -($f-primary_nav-side-width); bottom: 0; z-index: $f-primary_nav-side-zindex; width: $f-primary_nav-side-width; background-color: #fff; box-shadow: $f-primary_nav-shadow; direction: rtl; text-align: left; @include transition_fast(right); &.is-onscreen { right: 0; width: 100%; } .f-primary_nav-side_icon{ margin-right: 0.5em; } } .f-primary_nav-side_section { padding: 8px 20px; margin-bottom: 0; list-style: none; border-bottom: 1px solid $color-gray-300; direction: ltr; &:last-child { border: none; } .f-primary_nav-side_link_base { display: block; font-family: $font-face-semibold; font-size: $font-size-300; padding: 6px 0; color: $color-forever_blue; text-decoration: none; @include transition_fast(color); &:hover { color: $color-gray-600; } } &.is-color-block { border-bottom: none; padding: 4px 20px; .f-primary_nav-side_link_base { color: #fff; &:hover { color: #fff; } } } } .f-primary_nav-side_section-close { position: relative; width: 22px; padding-top: 20px; align-self: flex-start; cursor: pointer; border: none; outline: none; &::before, &::after { position: absolute; right: 8px; width: 22px; height: 2px; content: ' '; border-radius: 1px; background-color: $color-gray-600; @include transition_fast(background-color); } &::before { transform: rotate(45deg); } &::after { transform: rotate(-45deg); } &:hover { &::before, &::after { background-color: $color-forever_blue; } } } .f-primary_nav-side_section-info { padding-bottom: 15px; /* avatar/badge and storage meter */ .f-primary_nav-side_info-avameter { display: flex; align-items: center; margin: 0 -6px; } .f-primary_nav-side_info-avatar { position: relative; flex: 0 1 auto; /* necessary to dig into avatar and add custom size*/ .avatar { width: 80px; height: 80px; } //this accounts for some markup differences between store and webapp, making sure we are only styleing the badge > img:not(.avatar), > svg { position: absolute; height: 50px; width: 50px; top: 48px; left: 43px; } } .f-primary_nav-side_info-storage_meter { flex: 1 0 0; padding-left: 15px; /*store only, mars has a component*/ .f-primary_nav-side_info-storage_meter-bg { height: 10px; border-radius: 50px; background-color: $color-gray-300; margin-top: 4px; margin-bottom: 8px; width: 100%; } .f-primary_nav-side_info-storage_meter-percent { height: 100%; border-radius: 50px; } /* store only end*/ } .f-primary_nav-side_info-club { margin-top: 30px; line-height: 1; text-align: center; } } .f-primary_nav-side_section-ecom_list { .f-primary_nav-side_ecom-deals_link { @include deals_link_base(); } } .f-primary_nav-side_section-logged_out { .f-primary_nav-side_logged_out_button { margin-right: 20px; margin-top: 10px; display: block; } } .f-primary_nav_cpmeganav { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 94%; max-width: 1300px; background: #fff; box-shadow: 0 0 19px 0 rgba(0, 0, 0, 0.2); border-radius: 0 0 8px 8px; margin: 0; padding: 0; list-style: none; opacity: 1; transition: opacity 0.15s ease-in-out; z-index: inherit; &.hidden { opacity: 0; display: flex !important; visibility: none; top: -9999px; left:-9999px; } ul { list-style: none; margin: 0; padding: 0; } > li { padding: 20px 20px 0; &:nth-child(even) { background-color: $color-gray-200; } a { display: block; font-family: $font-face-semibold; line-height: 1; } p { margin: 0; color: $color-forever_gray; font-family: $font-face-regular; line-height: 1.4; } > a { font-size: 20px; } .f-primary_nav_cpmeganav_title { display: block; font-family: $font-face-semibold; line-height: 1; font-size: 20px; } > p { font-size: $font-size-200; } > ul { padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: flex-start; > li { min-width: 180px; max-width: 300px; min-height: 60px; margin-bottom: 20px; img { float: left; width: 60px; } > a { font-size: 16px; margin-left: 10px; display: inline-block; } > p { font-size: 12px; margin: 4px 0 0 70px; } span.badge { border-radius: 2px; padding: 2px 4px; color: #fff; background-color: $color-forever_orange; font-size: 10px; vertical-align: top; margin-top: 2px; display: inline-block; font-weight: bold; line-height: 1; } > ul { margin: 2px 0 0 70px; > li { margin: 0 0 2px; font-size: 12px; > a { font-size: 12px; display: inline-block; font-family: $font-face-regular; } } } } } } } //everything above xs @media (min-width: $screen-xs) { .f-primary_nav-main { padding: 0 15px; } .f-primary_nav-user_list { padding-left: 10px; } .f-primary_nav-user_item-avatar { visibility: visible; width: auto; } } //everything above sm @media (min-width: $screen-sm) { .f-primary_nav-ecom_list { > li { display: flex; } } .f-primary_nav-side.is-onscreen { width: $f-primary_nav-side-width; } } //everything above medium @media (min-width: $screen-md) { .f-primary_nav-user_item-logged_out { display: flex; } .f-primary_nav-side_section-ecom_list { display: none; } .f-primary_nav-user_item-side_toggle { &.is-unauthenticated { display: none; } } .f-primary_nav_cpmeganav { display: flex; > li { > p { min-height: 42px; } &:nth-child(odd) { width: 28%; } &:nth-child(2) { width: 44%; background-color: transparent; border-style: solid; border-width: 0 1px; border-color: $color-gray-400; } } } } //everything above lg @media (min-width: $screen-lg) { .f-primary_nav-ecom_list { > li > a { font-size: $font-size-300; } } .f-primary_nav_cpmeganav { > li { &:nth-child(odd) { width: 25%; } &:nth-child(2) { width: 50%; } } } }