/* variables specific to current element */ $element-specific-variables: ""; .#{$namespace}languageSwitcher { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ display: inline-flex; /* 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 */ // languageSwitcher__trigger &__trigger { // follows same logic as parent display: inline-flex; align-items: center; padding-left: map-deep-get($token-spacer-unit-map, "8"); padding-right: map-deep-get($token-spacer-unit-map, "8"); border-radius: map-deep-get($token-radius-map, "32"); height: $language-switcher-height-global; text-transform: uppercase; background-color: transparent; @include custom-prop-fallback("color","comp-navbar-text-color"); @include media-breakpoint-up(lg) { height: auto; min-height: $language-switcher-height-global; padding-left: map-deep-get($token-spacer-unit-map, "16"); } &[aria-expanded="true"] { @include custom-prop-fallback("background-color","comp-navbar-button-pressed-background-color"); #{$self}__icon { transform: rotate(180deg); } } &:hover { @media (hover: hover) { @include custom-prop-fallback("background-color","comp-navbar-button-hovered-background-color"); } } &:focus-visible { outline-style: solid; outline-width: map-deep-get($design-tokens, "comp-button-pressed-border-width"); } } &__icon { width: auto; margin-left: 0.15em; transition: transform 0.1s linear; display: none; @include media-breakpoint-up(lg){ display: inline-flex; } } &__mobileLang { text-transform: uppercase; @include media-breakpoint-up(lg) { display: none; } } &__desktopLang { display: none; @include media-breakpoint-up(lg) { display: block; } } /* modifiers */ // languageSwitcher -hasFlags &.-hasFlags { // follows same logic as base element #{$self}__trigger { @include custom-prop-fallback("background-color", "comp-button-secondary-background-color"); @include custom-prop-fallback("color", "comp-button-secondary-text-color"); border-radius: map-deep-get($token-radius-map, "button-small"); height: map-deep-get($token-button-size-big-map, "mobile" ,"min-height"); border: $border-width*2 solid; display: flex; align-items: center; padding-left: $border-width*2; padding-right: $border-width*2; } #{$self}__icon { display: block; height: auto; } } &.-searchModal { [data-search-modal-search-filter-btn] { &[aria-expanded="true"] { box-shadow: 0 0 0 $border-width*2 map-deep-get($token-icon-btn-base-map, "secondary", "default", "color"); [class*="icon"] { transform: rotate(180deg); } } [class*="text"] { @include media-breakpoint-between("xs","sm") { @include sr-only(); } } } &.-filtersActive { [data-search-modal-search-filter-btn] { box-shadow: 0 0 0 $border-width*2 map-deep-get($token-icon-btn-base-map, "secondary", "default", "color"); } } #{$self}__menu { top: calc(100% + map-deep-get($token-spacer-stack-max-map, "md")); @include media-breakpoint-up("sm") { width: 480px; max-width: 90vw; } } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }