/* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}navigationCard { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ display: flex; flex-direction: column; align-items: center; @include custom-prop-fallback("padding","comp-tile-inset-h"); @include spacer-component-stack-static-gap("sm"); text-align: center; position: relative; z-index: z("zero"); @include custom-prop-fallback("background-color","comp-tile-background-color"); @include custom-prop-fallback-override("comp-label-text-color","comp-tile-heading-text-color"); flex-grow: 1; hyphens: auto; /* Pseudo Elements */ &::before, &::after { content: ""; position: absolute; z-index: z("negative"); pointer-events: none; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; transition: opacity 0.15s linear; @include custom-prop-fallback("background-color","comp-tile-background-color"); } &::before { box-shadow: map-deep-get($token-shadow-map, "active"); } &::after { box-shadow: map-deep-get($token-shadow-map, "detail"); opacity: 0; } /* 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 { BUTTON#{$self} { width: 100%; } } /* children - write selector in full in comments in order to facilitate search */ // navigationCard__img &__img { width: map-deep-get($token-sizes-unit-map, "64"); height: map-deep-get($token-sizes-unit-map, "64"); svg, IMG { width: 100%; height: 100%; object-fit: contain; } } /* modifiers */ // navigationCard -noInteraction &.-noInteraction { // follows same logic as base element &::before, &::after { content: none; } } &[aria-pressed="true"], &.-isSelected, &.-isActive { @include custom-prop-fallback-box-shadow-color(0,0,0,$border-width*2, "comp-tile-active-border-color"); } &.-small { #{$self}__img { width: map-deep-get($token-sizes-unit-map, "48"); height: map-deep-get($token-sizes-unit-map, "48"); } } &.-large { #{$self}__img { width: map-deep-get($token-sizes-unit-map, "96"); height: map-deep-get($token-sizes-unit-map, "96"); @include media-breakpoint-up("lg") { width: 144px; height: 144px; } } } &.-justifyInlineStart { align-items: flex-start; text-align: left; } &[disabled] { &::before { opacity: 1 !important; } &::after { opacity: 0 !important; } > * { opacity: 0.48; } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover, &:focus { @media (hover: hover) { &::before { opacity: 0; } &::after { opacity: 1; } } } &:focus { } &:active { } &:focus, &:active { } }