@use 'iro-sass/src/index' as iro; @use '../functions' as fn; @include iro.props-namespace('links') { @include iro.props-store(( --colors: ( --underline: fn.global-color(--fg-hi2), --idle: fn.global-color(--accent --link-idle --quiet --fg), --visited: fn.global-color(--accent --link-visited --quiet --fg), --colored-underline: fn.global-color(--accent --link-idle --quiet --fg-hi), --key-focus: ( --border: fn.global-color(--focus --fill), --shadow: 0 0 0 calc(fn.global-dim(--focus --outline-width) + 2px) fn.global-color(--accent --primary --quiet --obj-lo), ), ) ), 'colors'); @include iro.props-store(( --colors: ( --underline: fn.global-color(--fg-hi), ) ), 'colors-dark'); @include iro.bem-scope(iro.props-namespace()) { :link, :visited { border-radius: .5px; color: currentColor; text-decoration: underline; text-decoration-color: fn.color(--underline); &:hover { text-decoration: underline; } @include iro.bem-at-theme('keyboard') { &:focus { box-shadow: 0 0 0 2px fn.color(--key-focus --border), fn.color(--key-focus --shadow); } } } @include iro.bem-modifier('invisible') { :link, :visited { text-decoration: none; } } @include iro.bem-modifier('colored') { :link { color: fn.color(--idle); text-decoration-color: fn.color(--colored-underline); } :visited { color: fn.color(--visited); } } } }