@include namespace('card') { @include store(( --colors: ( --bg: prop(--colors --bg-lo, $global: true), --fg: prop(--colors --fg, $global: true), --unread: prop(--colors --bg, $global: true), --border: prop(--colors --obj-hi, $global: true), --hover: ( --bg: prop(--colors --fg-lo, $global: true), --fg: prop(--colors --bg-hi, $global: true), ), ), --dims: ( --pad-x: 1em, --pad-y: px-to-em(12px), --hover-offset: px-to-em(-5px), --indicator: ( --width: 1em, --height: 4px, ), ) )); @include store(( --colors: ( --bg: prop(--colors --bg-hi, $global: true), --unread: prop(--colors --bg-lo, $global: true), --border: prop(--colors --bg-lo, $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 element('block') { @include modifier('indicator') { color: prop(--colors --hover --fg); } } } } &:visited { @include element('block') { @include modifier('indicator') { color: prop(--colors --bg); } } } @include element('block') { flex: 0 0 auto; padding: prop(--dims --pad-y) calc(.5 * #{prop(--dims --pad-x)}); overflow: hidden; text-overflow: ellipsis; @include modifier('main') { flex-shrink: 1; width: 100%; } /*@include modifier('separator') { align-self: stretch; padding-top: 0; padding-bottom: 0; &::before { content: ''; display: block; width: 1px; height: 100%; background-color: prop(--colors --border); } }*/ @include modifier('indicator') { transition: color .2s; color: prop(--colors --unread); &::before { content: ''; display: block; width: prop(--dims --indicator --width); height: prop(--dims --indicator --height); border-radius: prop(--dims --indicator --height); background-color: currentColor; } } } @media print { border: 2px solid currentColor; } } }