@include namespace('card') { @include store(( --dims: ( --pad-x: 1.1em, --pad-y: .8em ), --colors: ( --bg: prop(--colors --bg-lo, $global: true), --flip: ( --bg: prop(--colors --bg-lo, $global: true), ) ) )); @include component(namespace()) { display: flex; position: relative; align-items: center; background-color: prop(--colors --bg); line-height: 1.4; &:link, &:visited { color: currentColor; text-decoration: none; } &:hover { @include element('content') { @include modifier('flip') { visibility: visible; transition: visibility 0s, opacity .2s; opacity: 1; } } } @include element('content') { box-sizing: border-box; width: 100%; padding: prop(--dims --pad-y) prop(--dims --pad-x); @include modifier('flip') { visibility: hidden; position: absolute; top: 0; left: 0; height: 100%; transition: visibility 0s linear .2s, opacity .2s; opacity: 0; background-color: prop(--colors --flip --bg); } @include sibling-element('icon') { padding-right: prop(--dims --pad-x); padding-left: 0; } } @include element('icon') { display: block; flex: 0 0 auto; padding: prop(--dims --pad-y) 0 prop(--dims --pad-y) prop(--dims --pad-x); } } }