@include namespace('card') { @include store(( --dims: ( --pad-x: 1.1em, --pad-y: .8em, --hover-offset: -.5rem, ), --colors: ( --bg: prop(--colors --bg-lo, $global: true), --fg: prop(--colors --fg, $global: true), --hover: ( --bg: prop(--colors --themes --invert --bg, $global: true), --fg: prop(--colors --themes --invert --fg, $global: true), ), --link: ( --bg: prop(--colors --themes --link --bg-lo, $global: true), --fg: prop(--colors --themes --link --fg, $global: true), --fg-hi: prop(--colors --themes --link --fg-hi, $global: true), ) ) )); @include store(( --colors: ( --bg: prop(--colors --bg-hi, $global: true), ) ), 'light'); @include component(namespace()) { display: flex; position: relative; align-items: center; padding-right: calc(.5 * #{prop(--dims --pad-x)}); padding-left: calc(.5 * #{prop(--dims --pad-x)}); transform: translateY(0); transition: transform .2s, background-color .2s, color .2s; background-color: prop(--colors --bg); box-shadow: prop(--dims --obj-shadow, $global: true) prop(--colors --obj-shadow, $global: true); color: prop(--colors --fg); line-height: 1.4; &::after { content: ''; display: none; position: absolute; top: 100%; left: 0; width: 100%; height: calc(-1 * #{prop(--dims --hover-offset)}); } small, strong { transition: color .2s; } &:link, &:visited { text-decoration: none; &:hover, &:focus { transform: translateY(#{prop(--dims --hover-offset)}); background-color: prop(--colors --hover --bg); color: prop(--colors --hover --fg); &::after { display: block; } * { color: currentColor; } } } @include modifier('mark-visited') { &:link { background-color: prop(--colors --link --bg); color: prop(--colors --link --fg); small { color: prop(--colors --link --fg-hi); } } } @include element('block') { flex: 0 0 auto; padding: prop(--dims --pad-y) calc(.5 * #{prop(--dims --pad-x)}); @include modifier('main') { flex-shrink: 1; width: 100%; } } } }