From 9e5f08e31b4d228da011fa7cd92240433116997f Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 31 Mar 2022 09:51:12 +0200 Subject: Added icon nav component --- src/objects/_icon-nav.scss | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/objects/_icon-nav.scss (limited to 'src/objects/_icon-nav.scss') diff --git a/src/objects/_icon-nav.scss b/src/objects/_icon-nav.scss new file mode 100644 index 0000000..25f4a57 --- /dev/null +++ b/src/objects/_icon-nav.scss @@ -0,0 +1,68 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('icon-nav') { + @include iro.props-store(( + --dims: ( + --spacing: fn.global-dim(--size --100), + --item: ( + --pad: fn.global-dim(--size --125), + ) + ) + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --item: ( + --hover: ( + --bg: fn.global-color(--obj-hi), + --label: fn.global-color(--fg-lo), + ), + --disabled: ( + --label: fn.global-color(--fg-hi3), + ), + --key-focus: ( + --border: fn.global-color(--focus --fill), + --shadow: fn.global-color(--focus --shadow), + ), + ), + ), + ), 'colors'); + + @include iro.bem-object(iro.props-namespace()) { + display: flex; + align-items: center; + gap: fn.dim(--spacing); + + @include iro.bem-elem('item') { + padding: fn.dim(--item --pad); + border: 2px solid transparent; + border-radius: 10em; + color: fn.color(--item --disabled --label); + + &:link, + &:visited, + &:enabled { + color: currentColor; + + @include iro.bem-multi('&:hover, &:active', 'is' 'selected') { + background-color: fn.color(--item --hover --bg); + color: fn.color(--item --hover --label); + } + + @include iro.bem-at-theme('keyboard') { + &:focus { + border-color: fn.color(--item --key-focus --border); + background-color: fn.color(--item --hover --bg); + box-shadow: fn.color(--item --key-focus --shadow); + color: fn.color(--item --hover --label); + } + } + } + } + + @include iro.bem-modifier('vertical') { + flex-direction: column; + } + } +} -- cgit v1.2.3-70-g09d2