/* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}shortcutCard { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ position: relative; @include spacer-component-stack("lg"); /* 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 */ &, &__content { display: flex; flex-direction: column; align-items: flex-start; } // shortcutCard__content &__content { flex-grow: 1; @include spacer-component-stack("lg"); } &__img { height: map-deep-get($token-spacer-unit-map, "8")*23; width: 100%; @include media-breakpoint-up(md) { height: auto; } IMG { object-fit: contain; object-position: center bottom; width: 100%; height: 100%; } } &__text { flex-grow: 1; } // shortcutCard__action &__action { // follows same logic as parent &.stretched-link { &::after { border-radius: $box-border-radius-global; } &:hover, &:focus { @media (hover: hover) { &::after { box-shadow: map-deep-get($token-shadow-map, "hover"); } } } } } /* modifiers */ // shortcutCard -altStyle &.-altStyle { // follows same logic as base element } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }