From 144b7a2ea83507c98544d14ad9435cc5e51ac071 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 5 Feb 2022 12:26:35 +0100 Subject: Update --- src/objects/_heading.scss | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/objects/_heading.scss (limited to 'src/objects/_heading.scss') diff --git a/src/objects/_heading.scss b/src/objects/_heading.scss new file mode 100644 index 0000000..a0ce052 --- /dev/null +++ b/src/objects/_heading.scss @@ -0,0 +1,68 @@ +@use 'iro-sass/src/index' as iro; +@use '../vars'; +@use '../mixins/typography'; + +@include iro.props-namespace('heading') { + @include iro.props-store(( + --dims: ( + --in-page-margin: ( + --top: iro.props-get(--dims --spacing --y --lg, $global: true), + --top-sibling: iro.props-get(--dims --spacing --y --md, $global: true), + --bottom: iro.props-get(--dims --spacing --y --sm, $global: true), + ), + ), + --colors: ( + --light: iro.props-get(--colors --fg-hi, $global: true), + --strong: iro.props-get(--colors --fg-lo, $global: true), + ), + )); + + @include iro.bem-object(iro.props-namespace()) { + @include typography.set-font(vars.$font--headline); + + display: block; + margin-top: iro.props-get(--dims --in-page-margin --top); + margin-bottom: 0; + + & + & { + margin-top: iro.props-get(--dims --in-page-margin --top-sibling); + } + + @include iro.bem-modifier('xxl') { + color: iro.props-get(--colors --strong); + font-size: iro.props-get(--dims --font-size --xxxl, $global: true); + } + + @include iro.bem-modifier('xl') { + color: iro.props-get(--colors --strong); + font-size: iro.props-get(--dims --font-size --xxl, $global: true); + } + + @include iro.bem-modifier('lg') { + color: iro.props-get(--colors --strong); + font-size: iro.props-get(--dims --font-size --xl, $global: true); + } + + @include iro.bem-modifier('md') { + color: iro.props-get(--colors --strong); + font-size: iro.props-get(--dims --font-size --lg, $global: true); + } + + @include iro.bem-modifier('sm') { + @include typography.set-font($font--main, (line-height: map-get(vars.$font--headline, line-height))); + + color: iro.props-get(--colors --strong); + font-size: iro.props-get(--dims --font-size --md, $global: true); + font-weight: 500; + } + + @include iro.bem-modifier('xs') { + @include typography.set-font($font--main, (line-height: map-get(vars.$font--headline, line-height))); + + color: iro.props-get(--colors --light); + font-size: iro.props-get(--dims --font-size --xs, $global: true); + font-weight: 500; + text-transform: uppercase; + } + } +} -- cgit v1.2.3-70-g09d2