@use "sass:math"; /* variables specific to current element */ .#{$namespace}scrollToNav { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ --scroll-to-nav-inset-spacing-inline: #{map-deep-get($token-spacer-inset-map, "sm")}; position: relative; z-index: z("zero"); /* Pseudo Elements */ /* Include elements that are linked to the current element but have to reside at the root level of the stylesheet (e.g: keyframes) */ @at-root { } /* children - write selector in full in comments in order to facilitate search */ &__outerWrapper { margin-top: -($scroll-to-nav-top-space-global); } &__inner { padding-top: $scroll-to-nav-top-space-global; padding-bottom: $scroll-to-nav-top-space-global; margin-top: -($scroll-to-nav-top-space-global); margin-bottom: -($scroll-to-nav-top-space-global); } &__innerWrapper#{$self}__innerWrapper { } &__prev, &__next { position: absolute; z-index: z("low"); border-radius: 0; transition: opacity 0.2s linear; pointer-events: none; top: 0; bottom: math.div($scroll-to-nav-top-space-global,2); background-size: 100%; background-repeat: no-repeat; opacity: 1; width: map-deep-get($token-sizes-unit-map, "80"); @include gradient-directional-custom-prop("comp-shader-background-color", "comp-section-background-color", 0, 100%, -90deg, true); &[aria-disabled="true"] { opacity: 0; } &:hover { @media (hover: hover) { opacity: 0; } } } &__prev { left: 0; } &__next { right: 0; transform: rotate(180deg); } // scrollToNav__item &__item { // follows same logic as parent position: relative; z-index: z("zero"); border-radius: map-deep-get($token-radius-map, "16"); width: 136px; max-width: 100%; min-width: 100%; box-shadow: map-deep-get($token-shadow-map, "active"); display: flex; align-items: stretch; @include media-breakpoint-up("lg") { width: 220px; } } &__fakeInteraction { @media (hover: hover) { position: fixed; z-index: z("medium"); top: $scroll-to-nav-top-space-global; visibility: hidden; box-shadow: map-deep-get($token-shadow-map, "detail"); opacity: 0; border-radius: map-deep-get($token-radius-map, "16"); pointer-events: none; transition: opacity 0s linear; &.-isActive { opacity: 1; visibility: visible; transition: opacity 0.15s linear; } } } &.-noInteraction { pointer-events: none; } &.-itemsAutoWidth { #{$self}__item { width: auto; } } &.-itemsAutoWidthGrow { #{$self}__inner { width: 100%; } [class*="col"] { min-width: 136px; max-width: 320px; flex-grow: 1; } &.-justifyCenter { [class*="col"] { &:first-of-type { margin-left: auto; } &:last-of-type { margin-right: auto; } } } } &.-itemsAutoWidthGrow, &.-itemsAutoWidthCustomXl { #{$self}__inner { width: 100%; } [class*="col"] { &:first-of-type { margin-left: auto; } &:last-of-type { margin-right: auto; } min-width: 136px; max-width: 320px; flex-grow: 1; } } /* modifiers */ // scrollToNav -isScrolled /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }