/* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}photoGallery { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ position: relative; display: flex; align-items: flex-end; justify-content: flex-end; border-radius: map-deep-get($token-radius-map, "24"); background-color: transparent !important; padding-bottom: 56.25%; @supports (aspect-ratio: auto) { aspect-ratio: 16/9; padding-bottom: 0; } /* Pseudo Elements */ &::before { } &::after { } /* 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 */ &__inner, &__posterImg { position: absolute; z-index: z("deepdivenegative"); top: 0; left: 0; width: 100%; height: 100%; border-radius: inherit; } &__inner { &::before { content: ""; @include custom-prop-fallback("background-color", "sys-color-background-primary-100"); opacity: 0; position: absolute; z-index: z("negative"); top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; transition: opacity 0.15s linear; } } // photoGallery__posterImg &__posterImg { // follows same logic as parent object-fit: cover; } &__btnWrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: map-deep-get($token-spacer-inset-map, "md"); display: flex; align-items: flex-end; justify-content: flex-end; @include media-breakpoint-up("lg") { padding: map-deep-get($token-spacer-inset-map, "lg"); } } &__triggerBtn { border-radius: map-deep-get($token-radius-map, "20"); @include custom-prop-fallback("background-color", "comp-button-secondary-inverse-background-color"); @include custom-prop-fallback("color", "comp-button-secondary-text-color"); display: flex; align-items: center; @include spacer-component-inline("sm"); padding: map-deep-get($token-spacer-inset-map, "md"); @include media-breakpoint-up("lg") { border-radius: map-deep-get($token-radius-map, "24"); padding: map-deep-get($token-spacer-inset-map, "lg"); bottom: map-deep-get($token-spacer-inset-map, "lg"); right: map-deep-get($token-spacer-inset-map, "lg"); } [class*="icon"] { &::before { font-size: map-deep-get($token-sizes-unit-map, "40"); @include media-breakpoint-up("lg") { font-size: map-deep-get($token-sizes-unit-map, "48"); } } } &:hover, &:focus { @media (hover: hover) { @include custom-prop-fallback("background-color", "comp-button-secondary-hovered-background-color", true, true); } } } /* modifiers */ // photoGallery -altStyle &.-altStyle { // follows same logic as base element } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { #{$self}__inner { &::before { opacity: 0.24; } } } } &:focus { } &:active { } &:focus, &:active { } }