diff options
Diffstat (limited to 'src/objects/_avatar.vars.scss')
| -rw-r--r-- | src/objects/_avatar.vars.scss | 127 |
1 files changed, 52 insertions, 75 deletions
diff --git a/src/objects/_avatar.vars.scss b/src/objects/_avatar.vars.scss index 7d1c342..467d7cc 100644 --- a/src/objects/_avatar.vars.scss +++ b/src/objects/_avatar.vars.scss | |||
| @@ -1,102 +1,79 @@ | |||
| 1 | @use "sass:math"; | 1 | @use 'sass:math'; |
| 2 | 2 | ||
| 3 | @use "pkg:iro-sass/props"; | 3 | @use 'pkg:iro-sass/src/props'; |
| 4 | @use "../core.vars" as core; | 4 | @use '../core.vars' as core; |
| 5 | 5 | ||
| 6 | @function icon-mask($p) { | 6 | @function icon-mask($p) { |
| 7 | $offset: 0.15 * math.div(0.5, $p); | 7 | $offset: 0.15 * math.div(0.5, $p); |
| 8 | @return 'data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="avatar_mask" clipPathUnits="objectBoundingBox"><path d="M 0,0 H 1 V #{$p} H #{$p + $offset} C #{$p + 0.055},#{$p} #{$p},#{$p + 0.055} #{$p},#{$p + $offset} V 1 H 0 Z" /></clipPath></defs></svg>#avatar_mask'; | 8 | @return 'data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="avatar_mask" clipPathUnits="objectBoundingBox"><path d="M 0,0 H 1 V #{$p} H #{$p + $offset} C #{$p + 0.055},#{$p} #{$p},#{$p + 0.055} #{$p},#{$p + $offset} V 1 H 0 Z" /></clipPath></defs></svg>#avatar_mask'; |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | $size: props.def(--o-avatar--size, props.get(core.$size--500)) !default; | 11 | $size: props.def(--o-avatar--size, props.get(core.$size--500)) !default; |
| 12 | $font-size: props.def(--o-avatar--font-size, props.get(core.$font-size--100)) !default; | 12 | $font-size: props.def(--o-avatar--font-size, props.get(core.$font-size--100)) !default; |
| 13 | $indicator-size: props.def(--o-avatar--indicator-size, props.get(core.$size--150)) !default; | 13 | $indicator-size: props.def(--o-avatar--indicator-size, props.get(core.$size--150)) !default; |
| 14 | $indicator-spacing: props.def(--o-avatar--indicator-spacing, props.get(core.$size--40)) !default; | 14 | $indicator-spacing: props.def(--o-avatar--indicator-spacing, props.get(core.$size--40)) !default; |
| 15 | $rounding: props.def(--o-avatar--rounding, 25%) !default; | 15 | $rounding: props.def(--o-avatar--rounding, 25%) !default; |
| 16 | $icon-size: props.def(--o-avatar--icon-size, 1.2em) !default; | 16 | $icon-size: props.def(--o-avatar--icon-size, 1.2em) !default; |
| 17 | $icon-mask: props.def(--o-avatar--icon-mask, url(icon-mask(0.5))) !default; | 17 | $icon-mask: props.def(--o-avatar--icon-mask, url(icon-mask(.5))) !default; |
| 18 | 18 | ||
| 19 | $size--xxxl: props.def(--o-avatar--xxxl--size, props.get(core.$size--1600)) !default; | 19 | $size--xxxl: props.def(--o-avatar--xxxl--size, props.get(core.$size--1600)) !default; |
| 20 | $font-size--xxxl: props.def(--o-avatar--xxxl--font-size, props.get(core.$font-size--800)) !default; | 20 | $font-size--xxxl: props.def(--o-avatar--xxxl--font-size, props.get(core.$font-size--800)) !default; |
| 21 | $indicator-size--xxxl: props.def( | 21 | $indicator-size--xxxl: props.def(--o-avatar--xxxl--indicator-size, props.get(core.$size--400)) !default; |
| 22 | --o-avatar--xxxl--indicator-size, | 22 | $icon-size--xxxl: props.def(--o-avatar--xxxl--icon-size, 1.9em) !default; |
| 23 | props.get(core.$size--400) | 23 | $icon-mask--xxxl: props.def(--o-avatar--xxxl--icon-mask, url(icon-mask(.75))) !default; |
| 24 | ) !default; | ||
| 25 | $icon-size--xxxl: props.def(--o-avatar--xxxl--icon-size, 1.9em) !default; | ||
| 26 | $icon-mask--xxxl: props.def(--o-avatar--xxxl--icon-mask, url(icon-mask(0.75))) !default; | ||
| 27 | 24 | ||
| 28 | $size--xxl: props.def(--o-avatar--xxl--size, props.get(core.$size--1200)) !default; | 25 | $size--xxl: props.def(--o-avatar--xxl--size, props.get(core.$size--1200)) !default; |
| 29 | $font-size--xxl: props.def(--o-avatar--xxl--font-size, props.get(core.$font-size--600)) !default; | 26 | $font-size--xxl: props.def(--o-avatar--xxl--font-size, props.get(core.$font-size--600)) !default; |
| 30 | $indicator-size--xxl: props.def( | 27 | $indicator-size--xxl: props.def(--o-avatar--xxl--indicator-size, props.get(core.$size--300)) !default; |
| 31 | --o-avatar--xxl--indicator-size, | 28 | $icon-size--xxl: props.def(--o-avatar--xxl--icon-size, 1.7em) !default; |
| 32 | props.get(core.$size--300) | 29 | $icon-mask--xxl: props.def(--o-avatar--xxl--icon-mask, url(icon-mask(.7))) !default; |
| 33 | ) !default; | ||
| 34 | $icon-size--xxl: props.def(--o-avatar--xxl--icon-size, 1.7em) !default; | ||
| 35 | $icon-mask--xxl: props.def(--o-avatar--xxl--icon-mask, url(icon-mask(0.7))) !default; | ||
| 36 | 30 | ||
| 37 | $size--xl: props.def(--o-avatar--xl--size, props.get(core.$size--800)) !default; | 31 | $size--xl: props.def(--o-avatar--xl--size, props.get(core.$size--800)) !default; |
| 38 | $font-size--xl: props.def(--o-avatar--xl--font-size, props.get(core.$font-size--300)) !default; | 32 | $font-size--xl: props.def(--o-avatar--xl--font-size, props.get(core.$font-size--300)) !default; |
| 39 | $indicator-size--xl: props.def(--o-avatar--xl--indicator-size, props.get(core.$size--225)) !default; | 33 | $indicator-size--xl: props.def(--o-avatar--xl--indicator-size, props.get(core.$size--225)) !default; |
| 40 | $icon-size--xl: props.def(--o-avatar--xl--icon-size, 1.5em) !default; | 34 | $icon-size--xl: props.def(--o-avatar--xl--icon-size, 1.5em) !default; |
| 41 | $icon-mask--xl: props.def(--o-avatar--xl--icon-mask, url(icon-mask(0.6))) !default; | 35 | $icon-mask--xl: props.def(--o-avatar--xl--icon-mask, url(icon-mask(.6))) !default; |
| 42 | 36 | ||
| 43 | $size--lg: props.def(--o-avatar--lg--size, props.get(core.$size--650)) !default; | 37 | $size--lg: props.def(--o-avatar--lg--size, props.get(core.$size--650)) !default; |
| 44 | $font-size--lg: props.def(--o-avatar--lg--font-size, props.get(core.$font-size--200)) !default; | 38 | $font-size--lg: props.def(--o-avatar--lg--font-size, props.get(core.$font-size--200)) !default; |
| 45 | $indicator-size--lg: props.def(--o-avatar--lg--indicator-size, props.get(core.$size--175)) !default; | 39 | $indicator-size--lg: props.def(--o-avatar--lg--indicator-size, props.get(core.$size--175)) !default; |
| 46 | $icon-size--lg: props.def(--o-avatar--lg--icon-size, 1.25em) !default; | 40 | $icon-size--lg: props.def(--o-avatar--lg--icon-size, 1.25em) !default; |
| 47 | $icon-mask--lg: props.def(--o-avatar--lg--icon-mask, url(icon-mask(0.55))) !default; | 41 | $icon-mask--lg: props.def(--o-avatar--lg--icon-mask, url(icon-mask(.55))) !default; |
| 48 | 42 | ||
| 49 | $size--sm: props.def(--o-avatar--sm--size, props.get(core.$size--375)) !default; | 43 | $size--sm: props.def(--o-avatar--sm--size, props.get(core.$size--375)) !default; |
| 50 | $font-size--sm: props.def(--o-avatar--sm--font-size, props.get(core.$font-size--75)) !default; | 44 | $font-size--sm: props.def(--o-avatar--sm--font-size, props.get(core.$font-size--75)) !default; |
| 51 | $indicator-size--sm: props.def(--o-avatar--sm--indicator-size, props.get(core.$size--125)) !default; | 45 | $indicator-size--sm: props.def(--o-avatar--sm--indicator-size, props.get(core.$size--125)) !default; |
| 52 | $icon-size--sm: props.def(--o-avatar--sm--icon-size, 1.2em) !default; | 46 | $icon-size--sm: props.def(--o-avatar--sm--icon-size, 1.2em) !default; |
| 53 | $icon-mask--sm: props.def(--o-avatar--sm--icon-mask, url(icon-mask(0.5))) !default; | 47 | $icon-mask--sm: props.def(--o-avatar--sm--icon-mask, url(icon-mask(.5))) !default; |
| 54 | 48 | ||
| 55 | $size--xs: props.def(--o-avatar--xs--size, props.get(core.$size--250)) !default; | 49 | $size--xs: props.def(--o-avatar--xs--size, props.get(core.$size--250)) !default; |
| 56 | $font-size--xs: props.def(--o-avatar--xs--font-size, props.get(core.$font-size--50)) !default; | 50 | $font-size--xs: props.def(--o-avatar--xs--font-size, props.get(core.$font-size--50)) !default; |
| 57 | $indicator-size--xs: props.def(--o-avatar--xs--indicator-size, props.get(core.$size--100)) !default; | 51 | $indicator-size--xs: props.def(--o-avatar--xs--indicator-size, props.get(core.$size--100)) !default; |
| 58 | $icon-size--xs: props.def(--o-avatar--xs--icon-size, 1.2em) !default; | 52 | $icon-size--xs: props.def(--o-avatar--xs--icon-size, 1.2em) !default; |
| 59 | $icon-mask--xs: props.def(--o-avatar--xs--icon-mask, url(icon-mask(0.5))) !default; | 53 | $icon-mask--xs: props.def(--o-avatar--xs--icon-mask, url(icon-mask(.5))) !default; |
| 60 | 54 | ||
| 61 | $key-focus--border-width: props.def( | 55 | $key-focus--border-width: props.def(--o-avatar--key-focus--border-width, props.get(core.$key-focus--border-width)) !default; |
| 62 | --o-avatar--key-focus--border-width, | 56 | $key-focus--border-offset: props.def(--o-avatar--key-focus--border-offset, props.get(core.$key-focus--border-offset)) !default; |
| 63 | props.get(core.$key-focus--border-width) | 57 | $key-focus--outline-width: props.def(--o-avatar--key-focus--outline-width, props.get(core.$key-focus--outline-width)) !default; |
| 64 | ) !default; | ||
| 65 | $key-focus--border-offset: props.def( | ||
| 66 | --o-avatar--key-focus--border-offset, | ||
| 67 | props.get(core.$key-focus--border-offset) | ||
| 68 | ) !default; | ||
| 69 | $key-focus--outline-width: props.def( | ||
| 70 | --o-avatar--key-focus--outline-width, | ||
| 71 | props.get(core.$key-focus--outline-width) | ||
| 72 | ) !default; | ||
| 73 | 58 | ||
| 74 | $bg-color--h: props.def(--o-avatar--bg-color--h, 354, "color") !default; | 59 | $bg-color--h: props.def(--o-avatar--bg-color--h, 354, 'color') !default; |
| 75 | $bg-color--s: props.def(--o-avatar--bg-color--s, 44%, "color") !default; | 60 | $bg-color--s: props.def(--o-avatar--bg-color--s, 44%, 'color') !default; |
| 76 | $bg-color--l: props.def(--o-avatar--bg-color--l, 45%, "color") !default; | 61 | $bg-color--l: props.def(--o-avatar--bg-color--l, 45%, 'color') !default; |
| 77 | 62 | ||
| 78 | $bg-color-2--h: props.def(--o-avatar--bg-color-2--h, 354, "color") !default; | 63 | $bg-color-2--h: props.def(--o-avatar--bg-color-2--h, 354, 'color') !default; |
| 79 | $bg-color-2--s: props.def(--o-avatar--bg-color-2--s, 44%, "color") !default; | 64 | $bg-color-2--s: props.def(--o-avatar--bg-color-2--s, 44%, 'color') !default; |
| 80 | $bg-color-2--l: props.def(--o-avatar--bg-color-2--l, 45%, "color") !default; | 65 | $bg-color-2--l: props.def(--o-avatar--bg-color-2--l, 45%, 'color') !default; |
| 81 | 66 | ||
| 82 | $bg-angle: props.def(--o-avatar--bg-angle, 180deg) !default; | 67 | $bg-angle: props.def(--o-avatar--bg-angle, 180deg) !default; |
| 83 | 68 | ||
| 84 | $key-focus--border-color: props.def( | 69 | $key-focus--border-color: props.def(--o-avatar--key-focus--border-color, props.get(core.$theme, --focus, --border), 'color') !default; |
| 85 | --o-avatar--key-focus--border-color, | 70 | $key-focus--outline-color: props.def(--o-avatar--key-focus--outline-color, props.get(core.$theme, --focus, --outline), 'color') !default; |
| 86 | props.get(core.$theme, --focus, --border), | ||
| 87 | "color" | ||
| 88 | ) !default; | ||
| 89 | $key-focus--outline-color: props.def( | ||
| 90 | --o-avatar--key-focus--outline-color, | ||
| 91 | props.get(core.$theme, --focus, --outline), | ||
| 92 | "color" | ||
| 93 | ) !default; | ||
| 94 | 71 | ||
| 95 | $sizes: ( | 72 | $sizes: ( |
| 96 | "xs" $size--xs $font-size--xs $indicator-size--xs $icon-size--xs $icon-mask--xs, | 73 | 'xs' $size--xs $font-size--xs $indicator-size--xs $icon-size--xs $icon-mask--xs, |
| 97 | "sm" $size--sm $font-size--sm $indicator-size--sm $icon-size--sm $icon-mask--sm, | 74 | 'sm' $size--sm $font-size--sm $indicator-size--sm $icon-size--sm $icon-mask--sm, |
| 98 | "lg" $size--lg $font-size--lg $indicator-size--lg $icon-size--lg $icon-mask--lg, | 75 | 'lg' $size--lg $font-size--lg $indicator-size--lg $icon-size--lg $icon-mask--lg, |
| 99 | "xl" $size--xl $font-size--xl $indicator-size--xl $icon-size--xl $icon-mask--xl, | 76 | 'xl' $size--xl $font-size--xl $indicator-size--xl $icon-size--xl $icon-mask--xl, |
| 100 | "xxl" $size--xxl $font-size--xxl $indicator-size--xxl $icon-size--xxl $icon-mask--xxl, | 77 | 'xxl' $size--xxl $font-size--xxl $indicator-size--xxl $icon-size--xxl $icon-mask--xxl, |
| 101 | "xxxl" $size--xxxl $font-size--xxxl $indicator-size--xxxl $icon-size--xxxl $icon-mask--xxxl | 78 | 'xxxl' $size--xxxl $font-size--xxxl $indicator-size--xxxl $icon-size--xxxl $icon-mask--xxxl, |
| 102 | ) !default; | 79 | ) !default; |
