/* variables specific to current element */ $icon-link-box-padding: map-deep-get($token-spacer-inset-map, "md"); $icon-link-box-padding-lg: map-deep-get($token-spacer-inset-map, "lg"); .#{$namespace}iconLinkBox { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ position: relative; z-index: z("zero"); display: flex; align-items: stretch; padding: $icon-link-box-padding; border-radius: map-deep-get($token-radius-map, "16"); transition: box-shadow 0.15s linear; @include custom-prop-fallback("background-color","comp-card-raised-background-color"); @include media-breakpoint-up(lg) { flex-direction: column; padding: $icon-link-box-padding-lg; } /* 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; } &::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 { } /* children - write selector in full in comments in order to facilitate search */ // iconLinkBox__icon &__icon { width: map-deep-get($token-sizes-unit-map, "48"); height: map-deep-get($token-sizes-unit-map, "48"); margin-right: map-deep-get($token-spacer-stack-max-map, "md"); svg, IMG { width: 100%; height: 100%; object-fit: cover; } @include media-breakpoint-up(lg) { width: map-deep-get($token-sizes-unit-map, "64"); height: map-deep-get($token-sizes-unit-map, "64"); margin-right: 0; margin-bottom: map-deep-get($token-spacer-stack-max-map, "lg"); } } &__titleIcon { vertical-align: baseline; &::before { font-size: map-deep-get($token-font-size-map, "body", "m"); } } // iconLinkBox__inner &__inner { display: flex; flex-direction: column; justify-content: center; } &__badge { display: flex; margin-top: map-deep-get($token-spacer-stack-max-map, "sm"); @include media-breakpoint-up(lg) { margin-top: 0; position: absolute; top: $icon-link-box-padding-lg; right: $icon-link-box-padding-lg; } } /* modifiers */ // iconLinkBox -row &.-row { // follows same logic as base element @include media-breakpoint-up(lg) { flex-direction: row; } #{$self}__icon { margin-right: map-deep-get($token-spacer-stack-max-map, "md"); margin-bottom: 0; } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover, &:focus { @media (hover: hover) { &::before { opacity: 0; } &::after { opacity: 1; } } } &:focus { } &:active { } &:focus, &:active { } }