From e3d34a6d6ce2db04c3c898ad6a4687a0c59df996 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 18 Oct 2024 19:07:42 +0200 Subject: Update --- src/objects/_action-button.vars.scss | 188 ++++++++++++++++++----------------- src/objects/_alert.scss | 50 +++------- src/objects/_alert.vars.scss | 26 +++++ src/objects/_avatar.scss | 131 ++++++++---------------- src/objects/_avatar.vars.scss | 52 ++++++++++ src/objects/_heading.scss | 8 +- 6 files changed, 234 insertions(+), 221 deletions(-) create mode 100644 src/objects/_avatar.vars.scss (limited to 'src/objects') diff --git a/src/objects/_action-button.vars.scss b/src/objects/_action-button.vars.scss index 16d9e7f..d1b3a4a 100644 --- a/src/objects/_action-button.vars.scss +++ b/src/objects/_action-button.vars.scss @@ -1,33 +1,33 @@ @use 'sass:map'; @use '../props'; -@use '../vars'; +@use '../core'; $line-height: props.def(--o-action-button--line-height, 1.4) !default; -$pad-i: props.def(--o-action-button--pad-i, props.get(vars.$size--150)) !default; -$pad-i-pill: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--200)) !default; -$pad-b: props.def(--o-action-button--pad-b, props.get(vars.$size--85)) !default; -$border-width: props.def(--o-action-button--border-width, props.get(vars.$border-width--thin)) !default; -$rounding: props.def(--o-action-button--rounding, props.get(vars.$rounding)) !default; -$font-size: props.def(--o-action-button--font-size, props.get(vars.$font-size--100)) !default; - -$pad-i--sm: props.def(--o-action-button--pad-i, props.get(vars.$size--100), 'sm') !default; -$pad-i-pill--sm: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--150), 'sm') !default; -$pad-b--sm: props.def(--o-action-button--pad-b, props.get(vars.$size--40), 'sm') !default; -$font-size--sm: props.def(--o-action-button--font-size, props.get(vars.$font-size--75), 'sm') !default; - -$pad-i--lg: props.def(--o-action-button--pad-i, props.get(vars.$size--175), 'lg') !default; -$pad-i-pill--lg: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--225), 'lg') !default; -$pad-b--lg: props.def(--o-action-button--pad-b, props.get(vars.$size--115), 'lg') !default; -$font-size--lg: props.def(--o-action-button--font-size, props.get(vars.$font-size--150), 'lg') !default; - -$pad-i--xl: props.def(--o-action-button--pad-i, props.get(vars.$size--225), 'xl') !default; -$pad-i-pill--xl: props.def(--o-action-button--pad-i-pill, props.get(vars.$size--300), 'xl') !default; -$pad-b--xl: props.def(--o-action-button--pad-b, props.get(vars.$size--150), 'xl') !default; -$font-size--xl: props.def(--o-action-button--font-size, props.get(vars.$font-size--200), 'xl') !default; - -$key-focus--border-width: props.def(--o-action-button--key-focus--border-width, props.get(vars.$key-focus--border-width)) !default; -$key-focus--border-offset: props.def(--o-action-button--key-focus--border-offset, props.get(vars.$key-focus--border-offset)) !default; -$key-focus--outline-width: props.def(--o-action-button--key-focus--outline-width, props.get(vars.$key-focus--outline-width)) !default; +$pad-i: props.def(--o-action-button--pad-i, props.get(core.$size--150)) !default; +$pad-i-pill: props.def(--o-action-button--pad-i-pill, props.get(core.$size--200)) !default; +$pad-b: props.def(--o-action-button--pad-b, props.get(core.$size--85)) !default; +$border-width: props.def(--o-action-button--border-width, props.get(core.$border-width--thin)) !default; +$rounding: props.def(--o-action-button--rounding, props.get(core.$rounding)) !default; +$font-size: props.def(--o-action-button--font-size, props.get(core.$font-size--100)) !default; + +$pad-i--sm: props.def(--o-action-button--pad-i, props.get(core.$size--100), 'sm') !default; +$pad-i-pill--sm: props.def(--o-action-button--pad-i-pill, props.get(core.$size--150), 'sm') !default; +$pad-b--sm: props.def(--o-action-button--pad-b, props.get(core.$size--40), 'sm') !default; +$font-size--sm: props.def(--o-action-button--font-size, props.get(core.$font-size--75), 'sm') !default; + +$pad-i--lg: props.def(--o-action-button--pad-i, props.get(core.$size--175), 'lg') !default; +$pad-i-pill--lg: props.def(--o-action-button--pad-i-pill, props.get(core.$size--225), 'lg') !default; +$pad-b--lg: props.def(--o-action-button--pad-b, props.get(core.$size--115), 'lg') !default; +$font-size--lg: props.def(--o-action-button--font-size, props.get(core.$font-size--150), 'lg') !default; + +$pad-i--xl: props.def(--o-action-button--pad-i, props.get(core.$size--225), 'xl') !default; +$pad-i-pill--xl: props.def(--o-action-button--pad-i-pill, props.get(core.$size--300), 'xl') !default; +$pad-b--xl: props.def(--o-action-button--pad-b, props.get(core.$size--150), 'xl') !default; +$font-size--xl: props.def(--o-action-button--font-size, props.get(core.$font-size--200), 'xl') !default; + +$key-focus--border-width: props.def(--o-action-button--key-focus--border-width, props.get(core.$key-focus--border-width)) !default; +$key-focus--border-offset: props.def(--o-action-button--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default; +$key-focus--outline-width: props.def(--o-action-button--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default; $fixed-sizes: ( 'sm' $pad-i--sm $pad-i-pill--sm $pad-b--sm $font-size--sm, @@ -35,149 +35,151 @@ $fixed-sizes: ( 'xl' $pad-i--xl $pad-i-pill--xl $pad-b--xl $font-size--xl, ) !default; -$default-theme: props.def(--o-action-button, ( - --bg-color: props.get(vars.$theme, --base, --75), - --label-color: props.get(vars.$theme, --text), - --border-color: props.get(vars.$theme, --border-strong), +$default-theme-override: () !default; +$default-theme: map.deep-merge(( + --bg-color: props.get(core.$theme, --base, --75), + --label-color: props.get(core.$theme, --text), + --border-color: props.get(core.$theme, --border-strong), --hover: ( - --bg-color: props.get(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --heading), - --border-color: props.get(vars.$theme, --text-mute-more), + --bg-color: props.get(core.$theme, --border-mute), + --label-color: props.get(core.$theme, --heading), + --border-color: props.get(core.$theme, --text-mute-more), ), --active: ( - --bg-color: props.get(vars.$theme, --border), - --label-color: props.get(vars.$theme, --heading), - --border-color: props.get(vars.$theme, --text-mute), + --bg-color: props.get(core.$theme, --border), + --label-color: props.get(core.$theme, --heading), + --border-color: props.get(core.$theme, --text-mute), ), --disabled: ( - --bg-color: props.get(vars.$theme, --bg-l1), - --label-color: props.get(vars.$theme, --border-strong), - --border-color: props.get(vars.$theme, --border), + --bg-color: props.get(core.$theme, --bg-l1), + --label-color: props.get(core.$theme, --border-strong), + --border-color: props.get(core.$theme, --border), ), --key-focus: ( - --border-color: props.get(vars.$theme, --focus, --border), - --outline-color: props.get(vars.$theme, --focus, --outline), + --border-color: props.get(core.$theme, --focus, --border), + --outline-color: props.get(core.$theme, --focus, --outline), ), --selected: ( - --bg-color: props.get(vars.$theme, --text-mute), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --text-mute), + --bg-color: props.get(core.$theme, --text-mute), + --label-color: props.get(core.$theme, --base, --50), + --border-color: props.get(core.$theme, --text-mute), --hover: ( - --bg-color: props.get(vars.$theme, --text), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --text), + --bg-color: props.get(core.$theme, --text), + --label-color: props.get(core.$theme, --base, --50), + --border-color: props.get(core.$theme, --text), ), --active: ( - --bg-color: props.get(vars.$theme, --heading), - --label-color: props.get(vars.$theme, --base, --50), - --border-color: props.get(vars.$theme, --heading), + --bg-color: props.get(core.$theme, --heading), + --label-color: props.get(core.$theme, --base, --50), + --border-color: props.get(core.$theme, --heading), ), --disabled: ( - --bg-color: props.get(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --border-strong), - --border-color: props.get(vars.$theme, --border-mute), + --bg-color: props.get(core.$theme, --border-mute), + --label-color: props.get(core.$theme, --border-strong), + --border-color: props.get(core.$theme, --border-mute), ), ), --quiet: ( - --label-color: props.get(vars.$theme, --text), + --label-color: props.get(core.$theme, --text), --hover: ( - --bg-color: props.get(vars.$theme, --border-mute), - --label-color: props.get(vars.$theme, --heading), + --bg-color: props.get(core.$theme, --border-mute), + --label-color: props.get(core.$theme, --heading), ), --active: ( - --bg-color: props.get(vars.$theme, --border), - --label-color: props.get(vars.$theme, --heading), + --bg-color: props.get(core.$theme, --border), + --label-color: props.get(core.$theme, --heading), ), --disabled: ( - --label-color: props.get(vars.$theme, --border-strong), + --label-color: props.get(core.$theme, --border-strong), ), ), -)) !default; +), $default-theme-override) !default; +$default-theme: props.def(--o-action-button, $default-theme); $static-themes: props.def(--o-action-button); -@each $theme in map.keys(props.get(vars.$transparent-colors)) { +@each $theme in map.keys(props.get(core.$transparent-colors)) { $button-theme: #{$theme}-static; $static-themes: props.merge($static-themes, ( $button-theme: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --100), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --400), + --bg-color: props.get(core.$transparent-colors, $theme, --100), + --label-color: props.get(core.$transparent-colors, $theme, --900), + --border-color: props.get(core.$transparent-colors, $theme, --400), --hover: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --300), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --500), + --bg-color: props.get(core.$transparent-colors, $theme, --300), + --label-color: props.get(core.$transparent-colors, $theme, --900), + --border-color: props.get(core.$transparent-colors, $theme, --500), ), --active: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --400), - --label-color: props.get(vars.$transparent-colors, $theme, --900), - --border-color: props.get(vars.$transparent-colors, $theme, --600), + --bg-color: props.get(core.$transparent-colors, $theme, --400), + --label-color: props.get(core.$transparent-colors, $theme, --900), + --border-color: props.get(core.$transparent-colors, $theme, --600), ), --disabled: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --100), - --label-color: props.get(vars.$transparent-colors, $theme, --500), - --border-color: props.get(vars.$transparent-colors, $theme, --300), + --bg-color: props.get(core.$transparent-colors, $theme, --100), + --label-color: props.get(core.$transparent-colors, $theme, --500), + --border-color: props.get(core.$transparent-colors, $theme, --300), ), --key-focus: ( - --border-color: props.get(vars.$transparent-colors, $theme, --900), - --outline-color: props.get(vars.$transparent-colors, $theme, --300), + --border-color: props.get(core.$transparent-colors, $theme, --900), + --outline-color: props.get(core.$transparent-colors, $theme, --300), ), --selected: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --800), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --bg-color: props.get(core.$transparent-colors, $theme, --800), + --label-color: props.get(core.$transparent-colors, $theme, --text), + --border-color: props.get(core.$transparent-colors, $theme, --100), --hover: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --900), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --bg-color: props.get(core.$transparent-colors, $theme, --900), + --label-color: props.get(core.$transparent-colors, $theme, --text), + --border-color: props.get(core.$transparent-colors, $theme, --100), ), --active: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --900), - --label-color: props.get(vars.$transparent-colors, $theme, --text), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --bg-color: props.get(core.$transparent-colors, $theme, --900), + --label-color: props.get(core.$transparent-colors, $theme, --text), + --border-color: props.get(core.$transparent-colors, $theme, --100), ), --disabled: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --200), - --label-color: props.get(vars.$transparent-colors, $theme, --500), - --border-color: props.get(vars.$transparent-colors, $theme, --100), + --bg-color: props.get(core.$transparent-colors, $theme, --200), + --label-color: props.get(core.$transparent-colors, $theme, --500), + --border-color: props.get(core.$transparent-colors, $theme, --100), ), ), --quiet: ( - --label-color: props.get(vars.$transparent-colors, $theme, --900), + --label-color: props.get(core.$transparent-colors, $theme, --900), --hover: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --300), - --label-color: props.get(vars.$transparent-colors, $theme, --900), + --bg-color: props.get(core.$transparent-colors, $theme, --300), + --label-color: props.get(core.$transparent-colors, $theme, --900), ), --active: ( - --bg-color: props.get(vars.$transparent-colors, $theme, --400), - --label-color: props.get(vars.$transparent-colors, $theme, --900), + --bg-color: props.get(core.$transparent-colors, $theme, --400), + --label-color: props.get(core.$transparent-colors, $theme, --900), ), --disabled: ( - --label-color: props.get(vars.$transparent-colors, $theme, --500), + --label-color: props.get(core.$transparent-colors, $theme, --500), ), ), ) diff --git a/src/objects/_alert.scss b/src/objects/_alert.scss index 774b443..651ad23 100644 --- a/src/objects/_alert.scss +++ b/src/objects/_alert.scss @@ -1,42 +1,24 @@ +@use 'sass:map'; +@use 'sass:meta'; @use 'iro-sass/src/iro-sass' as iro; -@use '../functions' as fn; +@use '../props'; -$themes: 'accent' 'positive' 'negative' 'warning' !default; +@forward 'alert.vars'; +@use 'alert.vars' as vars; -@include iro.props-namespace('alert') { - @include iro.props-store(( - --dims: ( - --border: fn.global-dim(--border --medium), - --pad-i: fn.global-dim(--size --250), - --pad-b: fn.global-dim(--size --200), - --rounding: fn.global-dim(--rounding), - ), - --colors: ( - --bg: fn.global-color(--bg-l2), - --border: fn.global-color(--text-mute-more), - ), - )); +@mixin styles { + @include props.materialize(meta.module-variables('vars')); - @each $theme in $themes { - @include iro.props-store(( - --colors: ( - --#{$theme}: ( - --border: fn.global-color(--#{$theme} --700), - ), - ), - )); - } - - @include iro.bem-object(iro.props-namespace()) { - padding-block: fn.dim(--pad-b); - padding-inline: fn.dim(--pad-i); - background-color: fn.color(--bg); - border: fn.dim(--border) solid fn.color(--border); - border-radius: fn.dim(--rounding); + @include iro.bem-object('alert') { + padding-block: props.get(vars.$pad-b); + padding-inline: props.get(vars.$pad-i); + background-color: props.get(vars.$bg-color); + border: props.get(vars.$border-width) solid props.get(vars.$border-color); + border-radius: props.get(vars.$rounding); - @each $theme in $themes { - @include iro.bem-modifier($theme) { - border-color: fn.color(--#{$theme} --border); + @each $mod, $theme in vars.$themes { + @include iro.bem-modifier($mod) { + border-color: props.get(vars.$populated-themes, $theme, --border-color); } } } diff --git a/src/objects/_alert.vars.scss b/src/objects/_alert.vars.scss index e69de29..64d8f1f 100644 --- a/src/objects/_alert.vars.scss +++ b/src/objects/_alert.vars.scss @@ -0,0 +1,26 @@ +@use '../props'; +@use '../core'; + +$border-width: props.def(--o-alert--border-width, props.get(core.$border-width--medium)) !default; +$pad-i: props.def(--o-alert--pad-i, props.get(core.$size--250)) !default; +$pad-b: props.def(--o-alert--pad-b, props.get(core.$size--200)) !default; +$rounding: props.def(--o-alert--rounding, props.get(core.$rounding)) !default; + +$bg-color: props.def(--o-alert--bg-color, props.get(core.$theme, --bg-l2)) !default; +$border-color: props.def(--o-alert--bg-color, props.get(core.$theme, --text-mute-more)) !default; + +$themes: ( + accent: --accent, + positive: --positive, + negative: --negative, + warning: --warning, +) !default; + +$populated-themes: props.def(--o-alert); +@each $theme, $key in $themes { + $populated-themes: props.merge($populated-themes, ( + $key: ( + --border-color: props.get(core.$theme, $key, --700), + ) + )); +} diff --git a/src/objects/_avatar.scss b/src/objects/_avatar.scss index d9c1105..45567b9 100644 --- a/src/objects/_avatar.scss +++ b/src/objects/_avatar.scss @@ -1,101 +1,52 @@ -@use 'sass:list'; +@use 'sass:meta'; @use 'iro-sass/src/iro-sass' as iro; -@use '../functions' as fn; +@use '../props'; -$sizes: 'xs' 'sm' 'lg' 'xl' 'xxl' 'xxxl'; +@forward 'avatar.vars'; +@use 'avatar.vars' as vars; -@mixin status($size: ()) { +@mixin status($indicator-size) { @include iro.bem-elem('status') { - inline-size: fn.dim(list.join($size, --indicator-size)); - block-size: fn.dim(list.join($size, --indicator-size)); + inline-size: props.get($indicator-size); + block-size: props.get($indicator-size); @include iro.bem-next-elem('content') { - mask-image: radial-gradient(circle calc(.5 * fn.dim(list.join($size, --indicator-size)) + fn.dim(--indicator-spacing)) at - calc(100% - .5 * fn.dim(list.join($size, --indicator-size))) - calc(100% - .5 * fn.dim(list.join($size, --indicator-size))), - transparent 95%, - #fff); + mask-image: radial-gradient(circle calc(.5 * props.get($indicator-size) + props.get(vars.$indicator-spacing)) at + calc(100% - .5 * props.get($indicator-size)) + calc(100% - .5 * props.get($indicator-size)), + transparent 95%, + #fff); } } } -@include iro.props-namespace('avatar') { - @include iro.props-store(( - --dims: ( - --size: fn.global-dim(--size --500), - --font-size: fn.global-dim(--font-size --100), - --indicator-size: fn.global-dim(--size --150), - --indicator-spacing: fn.global-dim(--size --40), - --rounding: 25%, +@mixin styles { + @include props.materialize(meta.module-variables('vars')); - --xxxl: ( - --size: fn.global-dim(--size --1600), - --font-size: fn.global-dim(--font-size --800), - --indicator-size: fn.global-dim(--size --400), - ), - --xxl: ( - --size: fn.global-dim(--size --1200), - --font-size: fn.global-dim(--font-size --600), - --indicator-size: fn.global-dim(--size --300), - ), - --xl: ( - --size: fn.global-dim(--size --800), - --font-size: fn.global-dim(--font-size --300), - --indicator-size: fn.global-dim(--size --225), - ), - --lg: ( - --size: fn.global-dim(--size --650), - --font-size: fn.global-dim(--font-size --200), - --indicator-size: fn.global-dim(--size --175), - ), - --sm: ( - --size: fn.global-dim(--size --375), - --font-size: fn.global-dim(--font-size --75), - --indicator-size: fn.global-dim(--size --125), - ), - --xs: ( - --size: fn.global-dim(--size --250), - --font-size: fn.global-dim(--font-size --50), - --indicator-size: fn.global-dim(--size --100), - ), - - --key-focus: ( - --border: fn.global-dim(--key-focus --border), - --border-offset: fn.global-dim(--key-focus --border-offset), - --outline: fn.global-dim(--key-focus --outline), - ), - ), - --colors: ( - --h: 354, - --s: 44%, - --l: 45%, - - --key-focus: ( - --border: fn.global-color(--focus --border), - --outline: fn.global-color(--focus --outline), - ), - ), - )); - - @include iro.bem-object(iro.props-namespace()) { + @include iro.bem-object('avatar') { position: relative; display: inline-block; - font-size: fn.dim(--font-size); + font-size: props.get(vars.$font-size); font-style: normal; vertical-align: .05em; - border-radius: fn.dim(--rounding); + border-radius: props.get(vars.$rounding); &::after { position: absolute; - inset: calc(-1 * fn.dim(--key-focus --border-offset)); + inset: calc(-1 * props.get(vars.$key-focus--border-offset)); z-index: 1; display: none; pointer-events: none; content: ''; - border: fn.dim(--key-focus --border-offset) solid transparent; - border-radius: fn.dim(--rounding); - outline: fn.color(--key-focus --border) solid fn.dim(--key-focus --border); - box-shadow: 0 0 0 calc(fn.dim(--key-focus --border) + fn.dim(--key-focus --outline)) fn.color(--key-focus --outline); + border: props.get(vars.$key-focus--border-offset) solid transparent; + border-radius: props.get(vars.$rounding); + outline: props.get(vars.$key-focus--border-color) solid props.get(vars.$key-focus--border-width); + box-shadow: + 0 + 0 + 0 + calc(props.get(vars.$key-focus--border-width) + props.get(vars.$key-focus--outline-width)) + props.get(vars.$key-focus--outline-color); } @include iro.bem-elem('status') { @@ -104,17 +55,17 @@ $sizes: 'xs' 'sm' 'lg' 'xl' 'xxl' 'xxxl'; inset-inline-end: 0; } - @include status; + @include status(vars.$indicator-size); @include iro.bem-elem('content') { display: block; - inline-size: fn.dim(--size); - block-size: fn.dim(--size); - line-height: fn.dim(--size); + inline-size: props.get(vars.$size); + block-size: props.get(vars.$size); + line-height: props.get(vars.$size); text-align: center; object-fit: cover; object-position: center center; - border-radius: fn.dim(--rounding); + border-radius: props.get(vars.$rounding); } @include iro.bem-modifier('circle') { @@ -131,27 +82,27 @@ $sizes: 'xs' 'sm' 'lg' 'xl' 'xxl' 'xxxl'; @include iro.bem-modifier('placeholder') { @include iro.bem-elem('content') { - background-color: hsl(0, 0%, fn.color(--l)); + background-color: hsl(0, 0%, props.get(vars.$bg-color--l)); } } @include iro.bem-modifier('colored') { @include iro.bem-elem('content') { color: #fff; - background-color: hsl(fn.color(--h), fn.color(--s), fn.color(--l)); + background-color: hsl(props.get(vars.$bg-color--h), props.get(vars.$bg-color--s), props.get(vars.$bg-color--l)); } } - @each $size in $sizes { - @include iro.bem-modifier($size) { - font-size: fn.dim(--#{$size} --font-size); + @each $mod, $size, $font-size, $indicator-size in vars.$sizes { + @include iro.bem-modifier($mod) { + font-size: props.get($font-size); - @include status(--#{$size}); + @include status($indicator-size); @include iro.bem-elem('content') { - inline-size: fn.dim(--#{$size} --size); - block-size: fn.dim(--#{$size} --size); - line-height: fn.dim(--#{$size} --size); + inline-size: props.get($size); + block-size: props.get($size); + line-height: props.get($size); } } } diff --git a/src/objects/_avatar.vars.scss b/src/objects/_avatar.vars.scss new file mode 100644 index 0000000..5b97ec8 --- /dev/null +++ b/src/objects/_avatar.vars.scss @@ -0,0 +1,52 @@ +@use '../props'; +@use '../core'; + +$size: props.def(--o-avatar--size, props.get(core.$size--500)) !default; +$font-size: props.def(--o-avatar--font-size, props.get(core.$font-size--100)) !default; +$indicator-size: props.def(--o-avatar--indicator-size, props.get(core.$size--150)) !default; +$indicator-spacing: props.def(--o-avatar--indicator-spacing, props.get(core.$size--40)) !default; +$rounding: props.def(--o-avatar--rounding, 25%) !default; + +$size--xxxl: props.def(--o-avatar--xxxl--size, props.get(core.$size--1600)) !default; +$font-size--xxxl: props.def(--o-avatar--xxxl--font-size, props.get(core.$font-size--800)) !default; +$indicator-size--xxxl: props.def(--o-avatar--xxxl--indicator-size, props.get(core.$size--400)) !default; + +$size--xxl: props.def(--o-avatar--xxl--size, props.get(core.$size--1200)) !default; +$font-size--xxl: props.def(--o-avatar--xxl--font-size, props.get(core.$font-size--600)) !default; +$indicator-size--xxl: props.def(--o-avatar--xxl--indicator-size, props.get(core.$size--300)) !default; + +$size--xl: props.def(--o-avatar--xl--size, props.get(core.$size--800)) !default; +$font-size--xl: props.def(--o-avatar--xl--font-size, props.get(core.$font-size--300)) !default; +$indicator-size--xl: props.def(--o-avatar--xl--indicator-size, props.get(core.$size--225)) !default; + +$size--lg: props.def(--o-avatar--lg--size, props.get(core.$size--650)) !default; +$font-size--lg: props.def(--o-avatar--lg--font-size, props.get(core.$font-size--200)) !default; +$indicator-size--lg: props.def(--o-avatar--lg--indicator-size, props.get(core.$size--175)) !default; + +$size--sm: props.def(--o-avatar--sm--size, props.get(core.$size--375)) !default; +$font-size--sm: props.def(--o-avatar--sm--font-size, props.get(core.$font-size--75)) !default; +$indicator-size--sm: props.def(--o-avatar--sm--indicator-size, props.get(core.$size--125)) !default; + +$size--xs: props.def(--o-avatar--xs--size, props.get(core.$size--250)) !default; +$font-size--xs: props.def(--o-avatar--xs--font-size, props.get(core.$font-size--50)) !default; +$indicator-size--xs: props.def(--o-avatar--xs--indicator-size, props.get(core.$size--100)) !default; + +$key-focus--border-width: props.def(--o-avatar--key-focus--border-width, props.get(core.$key-focus--border-width)) !default; +$key-focus--border-offset: props.def(--o-avatar--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default; +$key-focus--outline-width: props.def(--o-avatar--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default; + +$bg-color--h: props.def(--o-avatar--bg-color--h, 354) !default; +$bg-color--s: props.def(--o-avatar--bg-color--s, 44%) !default; +$bg-color--l: props.def(--o-avatar--bg-color--l, 45%) !default; + +$key-focus--border-color: props.def(--o-avatar--key-focus--border-color, props.get(core.$theme, --focus, --border)) !default; +$key-focus--outline-color: props.def(--o-avatar--key-focus--outline-color, props.get(core.$theme, --focus, --outline)) !default; + +$sizes: ( + 'xs' $size--xs $font-size--xs $indicator-size--xs, + 'sm' $size--sm $font-size--sm $indicator-size--sm, + 'lg' $size--lg $font-size--lg $indicator-size--lg, + 'xl' $size--xl $font-size--xl $indicator-size--xl, + 'xxl' $size--xxl $font-size--xxl $indicator-size--xxl, + 'xxxl' $size--xxxl $font-size--xxxl $indicator-size--xxxl, +) !default; diff --git a/src/objects/_heading.scss b/src/objects/_heading.scss index 7fbafea..8ed3b17 100644 --- a/src/objects/_heading.scss +++ b/src/objects/_heading.scss @@ -31,10 +31,10 @@ $sizes: 'xxl' 'xl' 'lg' 'md' 'sm' 'xs'; @include iro.bem-elem('highlight') { background-image: linear-gradient(to top, - transparent .05em, - fn.color(--bg) .05em, - fn.color(--bg) .5em, - transparent .5em); + transparent .05em, + fn.color(--bg) .05em, + fn.color(--bg) .5em, + transparent .5em); } @include iro.bem-modifier('xxl') { -- cgit v1.2.3-70-g09d2