@charset "UTF-8"; // Global Header Styles header { width: 100%; padding: 0.7em 1.5em; border-bottom: 1px solid; @include colors() { border-color: c(kinda-light); } nav { width: 100%; max-width: $max-width; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; a#logo { display: flex; align-items: center; @include colors() { color: c(medium-dark); } img#selfie { width: 50px; height: 50px; border: 1px solid; border-radius: 50%; @include colors() { border-color: c(light); } } span#name { margin: 0 0.6em; font-size: 1.25em; font-weight: 500; letter-spacing: -0.01em; } // mix up logo colors on hover &:hover { @include colors() { color: c(links); } img#selfie { opacity: 0.9; } } } // Horizontal emoji links ul { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; li { text-align: right; margin-left: 1.75em; a { display: inline-block; transition: transform 0.15s ease-in-out; will-change: transform; // stylelint-disable-line plugin/no-unsupported-browser-features @include colors() { color: c(medium-dark); } &:hover { transform: scale(1.1); @include colors() { color: c(links); } } span.icon { font-size: 1.3em; vertical-align: -0.085em; } span.text { font-size: 0.95em; font-weight: 500; letter-spacing: -0.002em; margin-left: 0.65em; } } // no margin on the first child to make more room on narrow windows (before responsiveness kicks in). // last child is the dark mode toggle -- margin is set directly on it in case it's hidden (if JS is disabled). &:first-child, &:last-child { margin-left: 0; } } // Dark mode toggle button.dark-mode-toggle { // native button reset border: 0; padding: 0; // prepare for lightbulb symbol depending on active theme (set in components/_global) background-color: transparent; background-repeat: no-repeat; background-size: 100% 100%; height: 1.56em; // 24.33px, don't ask width: 1.56em; margin-top: -0.05em; margin-left: 1.4em; margin-right: -0.3em; // weirdness w/ svg ratio cursor: pointer; // hidden by default in case user's JS is disabled, switches to `block` onload in dark-mode.js display: none; } } } } // Responsive @mixin responsive--header() { header { padding: 0.5em 1.25em; nav { a#logo { img#selfie { width: 70px; height: 70px; } span#name { display: none; } &:hover { img#selfie { opacity: 1; } } } ul { font-size: 1.6em; li { margin-left: 1.15em; a { span.icon { font-size: 0.9em; } // hide text next to emojis on mobile span.text { display: none; } // disable hover scale effect &:hover { transform: none; } } } // Dark mode toggle button.dark-mode-toggle { // TODO: figure out need for weird magic numbers here height: 1.08em; // ~27px, don't ask width: 1.08em; margin-top: 0.15em; margin-left: 1em; margin-right: -0.2em; // weirdness w/ svg ratio } } } } }