@use 'iro-sass/src/index' as iro; @use '../functions' as fn; @include iro.props-namespace('menu') { @include iro.props-store(( --dims: ( --separator: .6rem, --item: ( --pad-x: .8rem, --pad-y: .4rem, ), ), ), 'dims'); @include iro.props-store(( --colors: ( --header: ( --label: fn.global-color(--fg-hi2), ), --item: ( --hover: ( --bg: fn.global-color(--obj-hi), --label: fn.global-color(--fg-lo), ), --disabled: ( --label: fn.global-color(--fg-hi3), ), --key-focus: ( --bg: fn.global-color(--obj-hi), --label: fn.global-color(--fg-lo), --border: fn.global-color(--focus --fill), --shadow: fn.global-color(--focus --shadow), ), ), ), ), 'colors'); @include iro.bem-object(iro.props-namespace()) { @include iro.bem-elem('header') { padding: calc(1.5 * fn.dim(--item --pad-y)) fn.dim(--item --pad-x) calc(.5 * fn.dim(--item --pad-y)); color: fn.color(--header --label); font-size: fn.global-dim(--font-size --xs); font-weight: 500; letter-spacing: .5px; text-transform: uppercase; } @include iro.bem-elem('item') { display: block; box-sizing: border-box; width: 100%; padding: calc(fn.dim(--item --pad-y) - 2px) calc(fn.dim(--item --pad-x) - 2px); border: 2px solid transparent; color: fn.color(--item --disabled --label); &:link, &:visited, &:enabled { color: currentColor; &:hover, &:active { background-color: fn.color(--item --hover --bg); color: fn.color(--item --hover --label); } @include iro.bem-at-theme('keyboard') { &:focus { border-radius: 2px; border-color: fn.color(--item --key-focus --border); background-color: fn.color(--item --key-focus --bg); box-shadow: fn.color(--item --key-focus --shadow); color: fn.color(--item --key-focus --label); } } } } @include iro.bem-elem('separator') { height: fn.dim(--separator); } @include iro.bem-elem('icon-slot') { display: flex; justify-content: center; width: 1em; } } }