header { width: 100%; z-index: 100; background-color: $header-background-color; .dark-theme & { background-color: $header-background-color-dark; } .header-title { font-size: 1.5rem; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .menu .menu-item { position: relative; } .language-select { position: absolute; opacity: 0; left: 0; top: 0; width: 100%; height: 100%; &:hover { cursor: pointer; } } .theme-switch i { -webkit-transform: rotate(225deg); -moz-transform: rotate(225deg); -ms-transform: rotate(225deg); -o-transform: rotate(225deg); transform: rotate(225deg); } } #header-desktop { display: block; position: $header-position-desktop; height: $header-height-desktop; line-height: $header-height-desktop; .header-wrapper { width: auto; text-align: center; padding: 0 3%; display: flex; justify-content: space-between; .header-title { max-width: 30%; } .menu { overflow: hidden; white-space: nowrap; .menu-item { margin: 0 .5rem; &.theme-switch { margin: 0 .3rem; } } a.active { font-weight: 900; color: $header-hover-color; .dark-theme & { color: $header-hover-color-dark; } } } } } #header-mobile { display: none; position: $header-position-mobile; height: $header-height-mobile; line-height: $header-height-mobile; .header-wrapper { padding: 0; margin: 0; transition: all 0.3s ease 0s; .header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 1.125rem; padding-right: 1rem; padding-left: 1rem; box-sizing: border-box; .header-title { max-width: 80%; } .menu-toggle { cursor: pointer; line-height: 4rem; span { display: block; background: $global-font-color; width: 1.5rem; height: 2px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-transition: .1s margin .1s, .1s transform; -moz-transition: .1s margin .1s, .1s transform; -o-transition: .1s margin .1s, .1s transform; transition: .1s margin .1s, .1s transform; .dark-theme & { background: $global-font-color-dark; } } span:nth-child(1) { margin-bottom: .5rem; } span:nth-child(3) { margin-top: .5rem; } &.active { span { -webkit-transition: .1s margin, .1s transform .1s; -moz-transition: .1s margin, .1s transform .1s; -o-transition: .1s margin, .1s transform .1s; transition: .1s margin, .1s transform .1s; } span:nth-child(1) { -webkit-transform: rotate(45deg) translate(.4rem, .5rem); -moz-transform: rotate(45deg) translate(.4rem, .5rem); -ms-transform: rotate(45deg) translate(.4rem, .5rem); -o-transform: rotate(45deg) translate(.4rem, .5rem); transform: rotate(45deg) translate(.4rem, .5rem); } span:nth-child(2) { opacity: 0 } span:nth-child(3) { -moz-transform: rotate(-45deg) translate(.4rem, -.5rem); -ms-transform: rotate(-45deg) translate(.4rem, -.5rem); -webkit-transform: rotate(-45deg) translate(.4rem, -.5rem); -o-transform: rotate(-45deg) translate(.4rem, -.5rem); transform: rotate(-45deg) translate(.4rem, -.5rem); } } } } .menu { text-align: center; background: $global-background-color; border-top: 2px solid $global-font-color; display: none; box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.1); a { display: block; line-height: 2.5rem; } &.active { display: block; } .dark-theme & { background: $global-background-color-dark; border-top: 2px solid $global-font-color-dark; } } } }