$banner-vertical-padding-assigned: 6px; $banner-vertical-padding-unassigned: 10px; $banner-max-width: 70%; $banner-background-visible: 0.1; $banner-color: transparentize($color-white, 0.2); $banner-hover-effect-speed: 0.15s; $chevron-rotate-effect-speed: 0.25s; $dropdown-entrance-and-exit-effect-speed: 0.22s; @mixin ambassador_banner($banner-background-gradient, $height) { position: relative; height: $height; color: $banner-color; background-image: $banner-background-gradient; cursor: pointer; z-index: $in-front-of-primary-nav; &.is-behind_fixed-nav { z-index: $behind-primary-nav; height: $ambassador-banner-height-assigned; } &::after { position: absolute; height: $height; top: 0; left: 0; width: 100%; background-color: $color-black; opacity: 0; @include transition(opacity $banner-hover-effect-speed ease-in-out); z-index: $zindex-navbar - 1; content: ""; pointer-events: none; } &:hover { &::after { opacity: $banner-background-visible; } } } a.ambassador_banner { display: block; &:hover, &:focus, &:active, &:active:focus { text-decoration: none; } } .ambassador_banner-assigned { @include ambassador_banner($gradient-ambassador, $ambassador-banner-height-assigned); padding-top: $banner-vertical-padding-assigned; padding-bottom: $banner-vertical-padding-assigned; height: $ambassador-banner-height-assigned; &::after { height: $ambassador-banner-height-assigned; } &.open { .fa-chevron-down { @include transform(rotate(180deg)); } } .fa-chevron-down { @include transition(all $chevron-rotate-effect-speed linear); } } .ambassador_banner-unassigned { @include ambassador_banner($gradient-ambassador-alt, $ambassador-banner-height-unassigned); padding-top: $banner-vertical-padding-unassigned; padding-bottom: $banner-vertical-padding-unassigned; &.is-behind_fixed-nav { .ambassador_banner-btn { display: none; } } } // make the lead-in text just look like a btn on small devices .ambassador_banner-unassigned-text { @media (max-width: $screen-xs-max) { display: inline-block; height: 30px; padding: 4px 12px 8px; line-height: 1.3; border: 2px solid $color-white; border-radius: $border-radius-button; &:hover { text-decoration: underline; } } } .ambassador_banner-btn { padding-top: 4px; margin-left: 20px; height: 30px; font-size: $font-size-200; } .ambassador_banner-content { display: inline-block; vertical-align: middle; } .ambassador_banner-name { max-width: $banner-max-width; vertical-align: middle; } .ambassador_banner-dropdown_container { position: absolute; top: $ambassador-banner-height-assigned; left: 0; visibility: hidden; width: 100%; transform: translateY(-100%); @include transition(all $dropdown-entrance-and-exit-effect-speed ease-in); z-index: $in-front-of-primary-nav-but-behind-banner; pointer-events: none; &.open { opacity: 1; transform: translateY(0%); pointer-events: auto; visibility: visible; } } .ambassador_banner-dropdown { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; align-items: center; justify-content: center; background-image: $gradient-ambassador; border-top: 2px solid transparentize($color-white, 0.9); } .ambassador_banner-dropdown-avatar { align-self: flex-start; margin: 0; margin-right: $padding-large-horizontal * 2; } .ambassador_banner-dropdown-info { max-width: 100%; overflow: hidden; } .ambassador_banner-dropdown-info-secondary { margin-top: $padding-large-vertical; } .ambassador_banner-dropdown-info-main-rank { color: transparentize($color-white, 0.3); } .ambassador_banner-dropdown-info-main-location { color: transparentize($color-white, 0.2); } .ambassador_banner-dropdown-info .ambassador_banner-dropdown-info-link { // specificity needed to override style guide link styles display: inline-block; max-width: 100%; color: $color-white; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .ambassador_banner-dropdown-info-link_icon { padding-right: $padding-xs-horizontal; } .ambassador_banner-dropdown-info .ambassador_banner-dropdown-info-action_link { // specificity needed to override style guide link styles overflow: visible; // keeps links aligned with the pipe in between them @media screen and (max-width: $screen-xs) { display: block; } } .ambassador_banner-dropdown-info-action_link-hide { @media screen and (max-width: $screen-xs) { display: none; } }