@use "sass:math"; /* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}featureIconBox { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ display: flex; align-items: flex-start; /* 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, &__text { display: flex; flex-direction: column; justify-content: center; } // featureIconBox__inner &__innerContent { display: flex; } // featureIconBox__icon &__icon { width: $feature-icon-box-img-dimensions-global; height: $feature-icon-box-img-dimensions-global; margin-right: $feature-icon-box-img-spacing-global; object-fit: contain; svg, IMG { width: 100%; height: 100%; object-fit: cover; } @include media-breakpoint-up(lg) { width: $feature-icon-box-img-dimensions-lg-global; height: $feature-icon-box-img-dimensions-lg-global; margin-right: $feature-icon-box-img-spacing-lg-global; } } // featureIconBox__action &__action { // follows same logic as parent @include custom-prop-fallback("color", "sys-color-text-primary-muted"); margin-top: map-deep-get($token-spacer-stack-max-map, "sm"); display: inline-flex; align-items: center; @include media-breakpoint-up("lg") { margin-top: map-deep-get($token-spacer-stack-max-map, "md"); } } // featureIconBox__actionIcon &__actionIcon { // follows same logic as parent margin-right: map-deep-get($token-spacer-inline-map, "sm"); &::before { font-size: math.div(map-deep-get($token-font-size-map, "body", "m"),map-deep-get($token-font-size-map, "body", "s"))*1em; } } /* modifiers */ // featureIconBox -column &.-column { // follows same logic as base element @include media-breakpoint-up(lg) { #{$self}__innerContent { flex-direction: column; } } #{$self}__text { @include media-breakpoint-up(lg) { margin-top: map-deep-get($token-spacer-stack-max-map, "lg"); } } } &.-iconBig { #{$self}__icon { width: $feature-icon-box-img-big-dimensions-global; height: $feature-icon-box-img-big-dimensions-global; margin-right: $feature-icon-box-img-spacing-lg-global; @include media-breakpoint-up(lg) { width: $feature-icon-box-img-big-dimensions-lg-global; height: $feature-icon-box-img-big-dimensions-lg-global; } } } &.-columnCentered { @include media-breakpoint-up(lg) { justify-content: center; #{$self}__innerContent { align-items: center; text-align: center; flex-direction: column; } } #{$self}__icon { @include media-breakpoint-up(lg) { margin-right: 0; } } #{$self}__inner { @include media-breakpoint-up(lg) { align-items: center; } } #{$self}__action { @include media-breakpoint-up(lg) { margin-left: auto; margin-right: auto; } } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }