@include namespace('header') { @include store(( --colors: ( --bg: prop(--colors --bg-lo, $global: true), --fg: prop(--colors --fg-lo, $global: true), --hover: ( --bg: prop(--colors --fg-lo, $global: true), --fg: prop(--colors --bg-hi, $global: true), ), --active: ( --fg: prop(--colors --fg-lo, $global: true), ) ), --dims: ( --height: 4rem, --icon: 1.5rem, --pad-x: calc(.5 * (var(--header--dims--height) - var(--header--dims--icon))), ) )); @include store(( --colors: ( --bg: prop(--colors --bg-hi, $global: true), ) ), 'light'); @include store(( --dims: ( --height: 3.4rem, ) ), 'sm'); @include component(namespace()) { display: flex; height: prop(--dims --height); filter: drop-shadow(#{prop(--dims --obj-shadow, $global: true)} #{prop(--colors --obj-shadow, $global: true)}); @include element('item') { padding: 0 prop(--dims --pad-x); transition: background-color .2s, color .2s, border-left-color .2s; background-color: prop(--colors --bg); color: prop(--colors --fg); line-height: prop(--dims --height); text-decoration: none; @include next-twin-element { margin-left: 2px; } &:hover, &:focus { border-left-color: prop(--colors --hover --bg); background-color: prop(--colors --hover --bg); color: prop(--colors --hover --fg); } @include modifier('icon') { display: flex; align-items: center; justify-content: center; } @include modifier('active') { color: prop(--colors --active --fg); font-weight: bold; } } @include element('icon') { width: prop(--dims --icon); height: prop(--dims --icon); } @include media('>=lg') { position: sticky; top: 2px; margin-bottom: calc(-.75 * #{prop(--dims --height)}); } } }