/* variables specific to current element */ $product-card-img-dimensions: map-deep-get($token-sizes-unit-map, "80"); $product-card-img-dimensions-sm: map-deep-get($token-sizes-unit-map, "48"); .#{$namespace}productCard { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ @include spacer-component-inline("md"); display: flex; align-items: center; /* 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 */ // productCard__img &__img { width: $product-card-img-dimensions; height: $product-card-img-dimensions; flex-shrink: 0; } // productCard__text &__text { // follows same logic as parent margin-top: map-deep-get($token-spacer-unit-map, "2"); } /* modifiers */ // productCard -altStyle &.-small { #{$self}__img { width: $product-card-img-dimensions-sm; height: $product-card-img-dimensions-sm; } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }