/* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}speechbubble { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ @include custom-prop-fallback("background-color","sys-color-background-highlight-100"); @include custom-prop-fallback("color","sys-color-text-neutral-inverse"); border-radius: map-deep-get($token-radius-map, "24"); padding: map-deep-get($token-spacer-inset-map, "md"); position: relative; @include media-breakpoint-up("lg") { padding: map-deep-get($token-spacer-inset-map, "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 */ // speechbubble__childElement &__arrow { position: absolute; display: block; width: $popover-arrow-width; height: $popover-arrow-height; margin: 0 $popover-border-radius; &::before, &::after { position: absolute; display: block; content: ""; border-color: transparent; border-style: solid; } } /* modifiers */ // speechbubble -altStyle &.-altStyle { // follows same logic as base element } /* modifiers use popover data atttribute styles for arrow positioning */ &[data-popper-placement="top"], &[data-popper-placement="bottom"] { > [class*="arrow"] { left: 50%; transform: translateX(-50%); margin: 0; } } &[data-popper-placement="left"], &[data-popper-placement="right"] { > [class*="arrow"] { top: 50%; transform: translateY(-50%); margin: 0; } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }