@charset "UTF-8"; // Global Header Styles header { width: 100%; padding: 0 1.5em; box-sizing: border-box; border-bottom: 1px solid; @include colors() { border-color: c(kinda-light); } nav { width: 100%; max-width: $max-width; margin: 0 auto; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; a#logo { display: flex; align-items: center; @include colors() { color: c(medium-dark); } h1#name { margin: 1.1em 0 1.1em 0.725em; font-size: 1.35em; font-weight: 500; line-height: 1; letter-spacing: -0.01em; } svg { width: 28px; height: 40px; } // mix up logo colors on hover &:hover { @include colors() { color: c(links); } svg { g#c1 { fill: $color-logo2; } g#c2 { fill: $color-logo3; } g#c3 { fill: $color-logo1; } } } } // Horizontal emoji links ul { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; li { text-align: right; margin-left: 2em; a { display: inline-block; transition: transform 0.15s ease-in-out; @include colors() { color: c(medium-dark); } &:hover { transform: scale(1.15); @include colors() { color: c(links); } } span.icon { font-size: 1.35em; vertical-align: -0.075em; } span.text { font-size: 0.95em; font-weight: 500; letter-spacing: -0.002em; margin-left: 0.55em; } } // 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.5em; width: 1em; margin-left: 2em; 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: 1em 1.25em; nav { a#logo { img, svg { width: 36px; height: 54px; } h1#name { display: none; } } 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.025em; width: 0.75em; margin-top: 0.15em; margin-left: 1.15em; } } } } }