/* variables specific to current element */ .#{$namespace}energyBadge { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ display: flex; align-items: center; justify-content: center; @include spacer-component-inline(sm); width: map-deep-get($token-spacer-unit-map, "40"); height: map-deep-get($token-spacer-unit-map, "40"); border-radius: $energy-badge-border-radius-global; @include custom-prop-fallback("color", "sys-color-text-neutral-inverse"); /* 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 */ // energyBadge__childElement /* modifiers */ // energyBadge -performAPlus // energyBadge -performA // energyBadge -performB // energyBadge -performC // energyBadge -performD // energyBadge -performE // energyBadge -performF // energyBadge -performG // energyBadge -performH // energyBadge -performI @each $key, $value in $token-color-energy-classes-map { $classname: camelize(perform-#{$key}); &.-#{$classname} { background-color: #{$value}; @if $key == "e" or $key == "d" { @include custom-prop-fallback("color", "sys-color-text-neutral-contrast"); } @if $key == "g" or $key == "h" or $key == "i" { @include custom-prop-fallback("border-color", "sys-color-text-neutral-contrast","true","true"); } } } &.-interactable { cursor: pointer; input[type="radio"]:checked + & { border: $border-width*2 solid; @include custom-prop-fallback("border-color", "sys-color-border-secondary-strong"); } } &.-circle { border-radius: map-deep-get($token-radius-map, "circle"); } &.-smaller { width: map-deep-get($token-spacer-unit-map, "24"); height: map-deep-get($token-spacer-unit-map, "24"); } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }