@use 'iro-sass/src/iro-sass' as iro; @use '../functions' as fn; @use '../mixins' as mx; @use '../config'; @use 'include-media/dist/include-media' as media; $sizes: 'xxl' 'xl' 'lg' 'md' 'sm' 'xs'; @include iro.props-namespace('heading') { @include iro.props-store(( --dims: ( --offset: -.02em, ), --colors: ( --bg: fn.global-color(--base --50), ), )); @include iro.bem-object(iro.props-namespace()) { @include mx.set-font(--headline); display: block; margin-block-start: fn.global-dim(--heading --margin-bs); text-transform: none; letter-spacing: normal; transform: translateX(fn.dim(--offset)); & + & { margin-block-start: fn.global-dim(--heading --margin-bs-sibling); } @include iro.bem-elem('highlight') { background-image: linear-gradient(to top, transparent .05em, fn.color(--bg) .05em, fn.color(--bg) .5em, transparent .5em); } @include iro.bem-modifier('xxl') { @include mx.heading-strong(--xxl); } @include iro.bem-modifier('xl') { @include mx.heading-strong(--xl); } @include iro.bem-modifier('lg') { @include mx.heading-medium(--lg); } @include iro.bem-modifier('md') { @include mx.heading-medium(--md); } @include iro.bem-modifier('sm') { @include mx.heading-faint(--sm); } @include iro.bem-modifier('xs') { @include mx.heading-faint(--xs); } @include iro.bem-modifier('display') { @include mx.set-font(--headline); @include iro.bem-modifier('xxl') { @include mx.heading-strong(--display --xxl); @include media.media('<=md') { @include mx.heading-strong(--display-sm --xxl); } } @include iro.bem-modifier('xl') { @include mx.heading-strong(--display --xl); @include media.media('<=md') { @include mx.heading-strong(--display-sm --xl); } } @include iro.bem-modifier('lg') { @include mx.heading-strong(--display --lg); @include media.media('<=md') { @include mx.heading-strong(--display-sm --lg); } } @include iro.bem-modifier('md') { @include mx.heading-strong(--display --md); @include media.media('<=md') { @include mx.heading-strong(--display-sm --md); } } @include iro.bem-modifier('sm') { @include mx.heading-medium(--display --sm); @include media.media('<=md') { @include mx.heading-medium(--display-sm --sm); } } @include iro.bem-modifier('xs') { @include mx.heading-faint(--display --xs); @include media.media('<=md') { @include mx.heading-faint(--display-sm --xs); } } } } }