From 9cf32988c5a69a5c6380c2c83f7fd6aa7cb2a2f9 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 18 Dec 2023 14:21:48 +0100 Subject: Better heading mixin --- src/_mixins.scss | 2 +- src/objects/_heading.scss | 18 +++++++++--------- src/scopes/_headings.scss | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/_mixins.scss b/src/_mixins.scss index 506b8ee..b1dda37 100644 --- a/src/_mixins.scss +++ b/src/_mixins.scss @@ -12,7 +12,7 @@ @mixin heading-strong($size) { color: fn.foreign-color(--heading, --strong); - font-size: $size; + font-size: fn.global-dim(join(--heading, $size)); } @mixin heading-medium($size) { diff --git a/src/objects/_heading.scss b/src/objects/_heading.scss index e02e0a1..6f5e5b0 100644 --- a/src/objects/_heading.scss +++ b/src/objects/_heading.scss @@ -42,42 +42,42 @@ } @include iro.bem-modifier('xxl') { - @include mx.heading-strong(fn.global-dim(--heading --lg)); + @include mx.heading-strong(--lg); } @include iro.bem-modifier('xl') { - @include mx.heading-medium(fn.global-dim(--heading --md)); + @include mx.heading-medium(--md); } @include iro.bem-modifier('lg', 'md', 'sm', 'xs') { - @include mx.heading-faint(fn.global-dim(--heading --sm)); + @include mx.heading-faint(--sm); } @include iro.bem-modifier('display') { @include mx.set-font(--headline); @include iro.bem-modifier('xxl') { - @include mx.heading-strong(fn.global-dim(--heading --display --xxl)); + @include mx.heading-strong(--display --xxl); } @include iro.bem-modifier('xl') { - @include mx.heading-strong(fn.global-dim(--heading --display --xl)); + @include mx.heading-strong(--display --xl); } @include iro.bem-modifier('lg') { - @include mx.heading-strong(fn.global-dim(--heading --display --lg)); + @include mx.heading-strong(--display --lg); } @include iro.bem-modifier('md') { - @include mx.heading-strong(fn.global-dim(--heading --display --md)); + @include mx.heading-strong(--display --md); } @include iro.bem-modifier('sm') { - @include mx.heading-medium(fn.global-dim(--heading --display --sm)); + @include mx.heading-medium(--display --sm); } @include iro.bem-modifier('xs') { - @include mx.heading-faint(fn.global-dim(--heading --display --xs)); + @include mx.heading-faint(--display --xs); } } } diff --git a/src/scopes/_headings.scss b/src/scopes/_headings.scss index a8edb39..c241557 100644 --- a/src/scopes/_headings.scss +++ b/src/scopes/_headings.scss @@ -20,18 +20,18 @@ h1 { - @include mx.heading-strong(fn.global-dim(--heading --lg)); + @include mx.heading-strong(--lg); } h2 { - @include mx.heading-medium(fn.global-dim(--heading --md)); + @include mx.heading-medium(--md); } h3, h4, h5, h6 { - @include mx.heading-faint(fn.global-dim(--heading --sm)); + @include mx.heading-faint(--sm); } @include iro.bem-elem('highlight') { @@ -55,27 +55,27 @@ } h1 { - @include mx.heading-strong(fn.global-dim(--heading --display --xxl)); + @include mx.heading-strong(--display --xxl); } h2 { - @include mx.heading-strong(fn.global-dim(--heading --display --xl)); + @include mx.heading-strong(--display --xl); } h3 { - @include mx.heading-strong(fn.global-dim(--heading --display --lg)); + @include mx.heading-strong(--display --lg); } h4 { - @include mx.heading-strong(fn.global-dim(--heading --display --md)); + @include mx.heading-strong(--display --md); } h5 { - @include mx.heading-medium(fn.global-dim(--heading --display --sm)); + @include mx.heading-medium(--display --sm); } h6 { - @include mx.heading-faint(fn.global-dim(--heading --display --xs)); + @include mx.heading-faint(--display --xs); } } } -- cgit v1.2.3-70-g09d2