diff options
Diffstat (limited to 'src/objects/_heading.vars.scss')
| -rw-r--r-- | src/objects/_heading.vars.scss | 114 |
1 files changed, 91 insertions, 23 deletions
diff --git a/src/objects/_heading.vars.scss b/src/objects/_heading.vars.scss index 78413dd..cf07488 100644 --- a/src/objects/_heading.vars.scss +++ b/src/objects/_heading.vars.scss | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | @use 'sass:map'; | ||
| 2 | @use 'sass:string'; | ||
| 1 | @use 'iro-sass/src/props'; | 3 | @use 'iro-sass/src/props'; |
| 2 | @use '../core.vars' as core; | 4 | @use '../core.vars' as core; |
| 3 | 5 | ||
| @@ -5,8 +7,22 @@ $offset: props.def(--o-heading--offset, -.02em) !default; | |||
| 5 | $margin-bs: props.def(--o-heading--margin-bs, props.get(core.$size--700)) !default; | 7 | $margin-bs: props.def(--o-heading--margin-bs, props.get(core.$size--700)) !default; |
| 6 | $margin-bs-sibling: props.def(--o-heading--margin-bs-sibling, props.get(core.$size--325)) !default; | 8 | $margin-bs-sibling: props.def(--o-heading--margin-bs-sibling, props.get(core.$size--325)) !default; |
| 7 | 9 | ||
| 8 | $text-color: props.def(--o-heading--text-color, props.get(core.$theme, --heading), 'color') !default; | 10 | $text-color: props.def(--o-heading--text-color, props.get(core.$theme, --heading), 'color') !default; |
| 9 | $bg-color: props.def(--o-heading--bg-color, props.get(core.$theme, --base, --50), 'color') !default; | 11 | $bg-color: props.def(--o-heading--bg-color, props.get(core.$theme, --base, --50), 'color') !default; |
| 12 | |||
| 13 | $text-color--xxl: props.def(--o-heading--xxl--text-color, props.get(core.$theme, --heading), 'color') !default; | ||
| 14 | $text-color--xl: props.def(--o-heading--xl--text-color, props.get($text-color--xxl), 'color') !default; | ||
| 15 | $text-color--lg: props.def(--o-heading--lg--text-color, props.get($text-color--xxl), 'color') !default; | ||
| 16 | $text-color--md: props.def(--o-heading--md--text-color, props.get($text-color--xxl), 'color') !default; | ||
| 17 | $text-color--sm: props.def(--o-heading--sm--text-color, props.get(core.$theme, --text-mute-more), 'color') !default; | ||
| 18 | $text-color--xs: props.def(--o-heading--xs--text-color, props.get($text-color--sm), 'color') !default; | ||
| 19 | |||
| 20 | $display--text-color--xxl: props.def(--o-heading--display--xxl--text-color, props.get(core.$theme, --heading), 'color') !default; | ||
| 21 | $display--text-color--xl: props.def(--o-heading--display--xl--text-color, props.get($display--text-color--xxl), 'color') !default; | ||
| 22 | $display--text-color--lg: props.def(--o-heading--display--lg--text-color, props.get($display--text-color--xxl), 'color') !default; | ||
| 23 | $display--text-color--md: props.def(--o-heading--display--md--text-color, props.get($display--text-color--xxl), 'color') !default; | ||
| 24 | $display--text-color--sm: props.def(--o-heading--display--sm--text-color, props.get($display--text-color--xxl), 'color') !default; | ||
| 25 | $display--text-color--xs: props.def(--o-heading--display--xs--text-color, props.get(core.$theme, --text-mute-more), 'color') !default; | ||
| 10 | 26 | ||
| 11 | $bg-start: props.def(--o-heading--bg-start, .05em) !default; | 27 | $bg-start: props.def(--o-heading--bg-start, .05em) !default; |
| 12 | $bg-end: props.def(--o-heading--bg-end, .5em) !default; | 28 | $bg-end: props.def(--o-heading--bg-end, .5em) !default; |
| @@ -20,7 +36,7 @@ $text-transform: props.def(--o-heading--text-transform, none) !default; | |||
| 20 | $font-family--xxl: props.def(--o-heading--xxl--font-family, props.get(core.$font--standard--family)) !default; | 36 | $font-family--xxl: props.def(--o-heading--xxl--font-family, props.get(core.$font--standard--family)) !default; |
| 21 | $line-height--xxl: props.def(--o-heading--xxl--line-height, props.get(core.$font--standard--line-height)) !default; | 37 | $line-height--xxl: props.def(--o-heading--xxl--line-height, props.get(core.$font--standard--line-height)) !default; |
| 22 | $font-size--xxl: props.def(--o-heading--xxl--font-size, props.get(core.$font-size--300)) !default; | 38 | $font-size--xxl: props.def(--o-heading--xxl--font-size, props.get(core.$font-size--300)) !default; |
| 23 | $font-weight--xxl: props.def(--o-heading--xxl--font-weight, props.get(core.$font--standard--weight)) !default; | 39 | $font-weight--xxl: props.def(--o-heading--xxl--font-weight, bold) !default; |
| 24 | $letter-spacing--xxl: props.def(--o-heading--xxl--letter-spacing, 0) !default; | 40 | $letter-spacing--xxl: props.def(--o-heading--xxl--letter-spacing, 0) !default; |
| 25 | $feature-settings--xxl: props.def(--o-heading--xxl--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 41 | $feature-settings--xxl: props.def(--o-heading--xxl--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 26 | $text-transform--xxl: props.def(--o-heading--xxl--text-transform, none) !default; | 42 | $text-transform--xxl: props.def(--o-heading--xxl--text-transform, none) !default; |
| @@ -28,7 +44,7 @@ $text-transform--xxl: props.def(--o-heading--xxl--text-transform, none) !defau | |||
| 28 | $font-family--xl: props.def(--o-heading--xl--font-family, props.get(core.$font--standard--family)) !default; | 44 | $font-family--xl: props.def(--o-heading--xl--font-family, props.get(core.$font--standard--family)) !default; |
| 29 | $line-height--xl: props.def(--o-heading--xl--line-height, props.get(core.$font--standard--line-height)) !default; | 45 | $line-height--xl: props.def(--o-heading--xl--line-height, props.get(core.$font--standard--line-height)) !default; |
| 30 | $font-size--xl: props.def(--o-heading--xl--font-size, props.get(core.$font-size--200)) !default; | 46 | $font-size--xl: props.def(--o-heading--xl--font-size, props.get(core.$font-size--200)) !default; |
| 31 | $font-weight--xl: props.def(--o-heading--xl--font-weight, props.get(core.$font--standard--weight)) !default; | 47 | $font-weight--xl: props.def(--o-heading--xl--font-weight, bold) !default; |
| 32 | $letter-spacing--xl: props.def(--o-heading--xl--letter-spacing, 0) !default; | 48 | $letter-spacing--xl: props.def(--o-heading--xl--letter-spacing, 0) !default; |
| 33 | $feature-settings--xl: props.def(--o-heading--xl--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 49 | $feature-settings--xl: props.def(--o-heading--xl--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 34 | $text-transform--xl: props.def(--o-heading--xl--text-transform, none) !default; | 50 | $text-transform--xl: props.def(--o-heading--xl--text-transform, none) !default; |
| @@ -51,27 +67,27 @@ $text-transform--md: props.def(--o-heading--md--text-transform, none) !default | |||
| 51 | 67 | ||
| 52 | $font-family--sm: props.def(--o-heading--sm--font-family, props.get(core.$font--standard--family)) !default; | 68 | $font-family--sm: props.def(--o-heading--sm--font-family, props.get(core.$font--standard--family)) !default; |
| 53 | $line-height--sm: props.def(--o-heading--sm--line-height, props.get(core.$font--standard--line-height)) !default; | 69 | $line-height--sm: props.def(--o-heading--sm--line-height, props.get(core.$font--standard--line-height)) !default; |
| 54 | $font-size--sm: props.def(--o-heading--sm--font-size, props.get(core.$font-size--75)) !default; | 70 | $font-size--sm: props.def(--o-heading--sm--font-size, props.get(core.$font-size--100)) !default; |
| 55 | $font-weight--sm: props.def(--o-heading--sm--font-weight, 500) !default; | 71 | $font-weight--sm: props.def(--o-heading--sm--font-weight, normal) !default; |
| 56 | $letter-spacing--sm: props.def(--o-heading--sm--letter-spacing, 1px) !default; | 72 | $letter-spacing--sm: props.def(--o-heading--sm--letter-spacing, 0) !default; |
| 57 | $feature-settings--sm: props.def(--o-heading--sm--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 73 | $feature-settings--sm: props.def(--o-heading--sm--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 58 | $text-transform--sm: props.def(--o-heading--sm--text-transform, none) !default; | 74 | $text-transform--sm: props.def(--o-heading--sm--text-transform, none) !default; |
| 59 | 75 | ||
| 60 | $font-family--xs: props.def(--o-heading--xs--font-family, props.get(core.$font--standard--family)) !default; | 76 | $font-family--xs: props.def(--o-heading--xs--font-family, props.get(core.$font--standard--family)) !default; |
| 61 | $line-height--xs: props.def(--o-heading--xs--line-height, props.get(core.$font--standard--line-height)) !default; | 77 | $line-height--xs: props.def(--o-heading--xs--line-height, props.get(core.$font--standard--line-height)) !default; |
| 62 | $font-size--xs: props.def(--o-heading--xs--font-size, props.get(core.$font-size--50)) !default; | 78 | $font-size--xs: props.def(--o-heading--xs--font-size, props.get(core.$font-size--50)) !default; |
| 63 | $font-weight--xs: props.def(--o-heading--xs--font-weight, 500) !default; | 79 | $font-weight--xs: props.def(--o-heading--xs--font-weight, normal) !default; |
| 64 | $letter-spacing--xs: props.def(--o-heading--xs--letter-spacing, 1px) !default; | 80 | $letter-spacing--xs: props.def(--o-heading--xs--letter-spacing, 1px) !default; |
| 65 | $feature-settings--xs: props.def(--o-heading--xs--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 81 | $feature-settings--xs: props.def(--o-heading--xs--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 66 | $text-transform--xs: props.def(--o-heading--xs--text-transform, none) !default; | 82 | $text-transform--xs: props.def(--o-heading--xs--text-transform, none) !default; |
| 67 | 83 | ||
| 68 | $sizes: ( | 84 | $sizes: ( |
| 69 | 'xs' $font-family--xs $line-height--xs $font-size--xs $font-weight--xs $letter-spacing--xs $feature-settings--xs $text-transform--xs, | 85 | 'xs' $font-family--xs $line-height--xs $font-size--xs $font-weight--xs $letter-spacing--xs $feature-settings--xs $text-transform--xs $text-color--xs, |
| 70 | 'sm' $font-family--sm $line-height--sm $font-size--sm $font-weight--sm $letter-spacing--sm $feature-settings--sm $text-transform--sm, | 86 | 'sm' $font-family--sm $line-height--sm $font-size--sm $font-weight--sm $letter-spacing--sm $feature-settings--sm $text-transform--sm $text-color--sm, |
| 71 | 'md' $font-family--md $line-height--md $font-size--md $font-weight--md $letter-spacing--md $feature-settings--md $text-transform--md, | 87 | 'md' $font-family--md $line-height--md $font-size--md $font-weight--md $letter-spacing--md $feature-settings--md $text-transform--md $text-color--md, |
| 72 | 'lg' $font-family--lg $line-height--lg $font-size--lg $font-weight--lg $letter-spacing--lg $feature-settings--lg $text-transform--lg, | 88 | 'lg' $font-family--lg $line-height--lg $font-size--lg $font-weight--lg $letter-spacing--lg $feature-settings--lg $text-transform--lg $text-color--lg, |
| 73 | 'xl' $font-family--xl $line-height--xl $font-size--xl $font-weight--xl $letter-spacing--xl $feature-settings--xl $text-transform--xl, | 89 | 'xl' $font-family--xl $line-height--xl $font-size--xl $font-weight--xl $letter-spacing--xl $feature-settings--xl $text-transform--xl $text-color--xl, |
| 74 | 'xxl' $font-family--xxl $line-height--xxl $font-size--xxl $font-weight--xxl $letter-spacing--xxl $feature-settings--xxl $text-transform--xxl, | 90 | 'xxl' $font-family--xxl $line-height--xxl $font-size--xxl $font-weight--xxl $letter-spacing--xxl $feature-settings--xxl $text-transform--xxl $text-color--xxl, |
| 75 | ) !default; | 91 | ) !default; |
| 76 | 92 | ||
| 77 | $display--font-family--xxl: props.def(--o-heading--display--xxl--font-family, props.get(core.$font--headline--family)) !default; | 93 | $display--font-family--xxl: props.def(--o-heading--display--xxl--font-family, props.get(core.$font--headline--family)) !default; |
| @@ -101,14 +117,14 @@ $display--text-transform--lg: props.def(--o-heading--display--lg--text-transfo | |||
| 101 | $display--font-family--md: props.def(--o-heading--display--md--font-family, props.get(core.$font--standard--family)) !default; | 117 | $display--font-family--md: props.def(--o-heading--display--md--font-family, props.get(core.$font--standard--family)) !default; |
| 102 | $display--line-height--md: props.def(--o-heading--display--md--line-height, props.get(core.$font--standard--line-height)) !default; | 118 | $display--line-height--md: props.def(--o-heading--display--md--line-height, props.get(core.$font--standard--line-height)) !default; |
| 103 | $display--font-size--md: props.def(--o-heading--display--md--font-size, props.get(core.$font-size--150)) !default; | 119 | $display--font-size--md: props.def(--o-heading--display--md--font-size, props.get(core.$font-size--150)) !default; |
| 104 | $display--font-weight--md: props.def(--o-heading--display--md--font-weight, props.get(core.$font--standard--weight)) !default; | 120 | $display--font-weight--md: props.def(--o-heading--display--md--font-weight, bold) !default; |
| 105 | $display--letter-spacing--md: props.def(--o-heading--display--md--letter-spacing, 0) !default; | 121 | $display--letter-spacing--md: props.def(--o-heading--display--md--letter-spacing, 0) !default; |
| 106 | $display--feature-settings--md: props.def(--o-heading--display--md--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 122 | $display--feature-settings--md: props.def(--o-heading--display--md--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 107 | $display--text-transform--md: props.def(--o-heading--display--md--text-transform, none) !default; | 123 | $display--text-transform--md: props.def(--o-heading--display--md--text-transform, none) !default; |
| 108 | 124 | ||
| 109 | $display--font-family--sm: props.def(--o-heading--display--sm--font-family, props.get(core.$font--standard--family)) !default; | 125 | $display--font-family--sm: props.def(--o-heading--display--sm--font-family, props.get(core.$font--standard--family)) !default; |
| 110 | $display--line-height--sm: props.def(--o-heading--display--sm--line-height, props.get(core.$font--standard--line-height)) !default; | 126 | $display--line-height--sm: props.def(--o-heading--display--sm--line-height, props.get(core.$font--standard--line-height)) !default; |
| 111 | $display--font-size--sm: props.def(--o-heading--display--sm--font-size, props.get(core.$font-size--75)) !default; | 127 | $display--font-size--sm: props.def(--o-heading--display--sm--font-size, props.get(core.$font-size--100)) !default; |
| 112 | $display--font-weight--sm: props.def(--o-heading--display--sm--font-weight, bold) !default; | 128 | $display--font-weight--sm: props.def(--o-heading--display--sm--font-weight, bold) !default; |
| 113 | $display--letter-spacing--sm: props.def(--o-heading--display--sm--letter-spacing, 0) !default; | 129 | $display--letter-spacing--sm: props.def(--o-heading--display--sm--letter-spacing, 0) !default; |
| 114 | $display--feature-settings--sm: props.def(--o-heading--display--sm--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 130 | $display--feature-settings--sm: props.def(--o-heading--display--sm--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| @@ -117,7 +133,7 @@ $display--text-transform--sm: props.def(--o-heading--display--sm--text-transfo | |||
| 117 | $display--font-family--xs: props.def(--o-heading--display--xs--font-family, props.get(core.$font--standard--family)) !default; | 133 | $display--font-family--xs: props.def(--o-heading--display--xs--font-family, props.get(core.$font--standard--family)) !default; |
| 118 | $display--line-height--xs: props.def(--o-heading--display--xs--line-height, props.get(core.$font--standard--line-height)) !default; | 134 | $display--line-height--xs: props.def(--o-heading--display--xs--line-height, props.get(core.$font--standard--line-height)) !default; |
| 119 | $display--font-size--xs: props.def(--o-heading--display--xs--font-size, props.get(core.$font-size--50)) !default; | 135 | $display--font-size--xs: props.def(--o-heading--display--xs--font-size, props.get(core.$font-size--50)) !default; |
| 120 | $display--font-weight--xs: props.def(--o-heading--display--xs--font-weight, 500) !default; | 136 | $display--font-weight--xs: props.def(--o-heading--display--xs--font-weight, normal) !default; |
| 121 | $display--letter-spacing--xs: props.def(--o-heading--display--xs--letter-spacing, 1px) !default; | 137 | $display--letter-spacing--xs: props.def(--o-heading--display--xs--letter-spacing, 1px) !default; |
| 122 | $display--feature-settings--xs: props.def(--o-heading--display--xs--feature-settings, props.get(core.$font--standard--feature-settings)) !default; | 138 | $display--feature-settings--xs: props.def(--o-heading--display--xs--feature-settings, props.get(core.$font--standard--feature-settings)) !default; |
| 123 | $display--text-transform--xs: props.def(--o-heading--display--xs--text-transform, none) !default; | 139 | $display--text-transform--xs: props.def(--o-heading--display--xs--text-transform, none) !default; |
| @@ -130,10 +146,62 @@ $display--font-size--sm--md: props.def(--o-heading--display--sm--font-size, pro | |||
| 130 | $display--font-size--xs--md: props.def(--o-heading--display--xs--font-size, props.get(core.$font-size--50), 'md') !default; | 146 | $display--font-size--xs--md: props.def(--o-heading--display--xs--font-size, props.get(core.$font-size--50), 'md') !default; |
| 131 | 147 | ||
| 132 | $display--sizes: ( | 148 | $display--sizes: ( |
| 133 | 'xs' $display--font-family--xs $display--line-height--xs $display--font-size--xs $display--font-weight--xs $display--letter-spacing--xs $display--feature-settings--xs $display--text-transform--xs, | 149 | 'xs' $display--font-family--xs $display--line-height--xs $display--font-size--xs $display--font-weight--xs $display--letter-spacing--xs $display--feature-settings--xs $display--text-transform--xs $display--text-color--xs, |
| 134 | 'sm' $display--font-family--sm $display--line-height--sm $display--font-size--sm $display--font-weight--sm $display--letter-spacing--sm $display--feature-settings--sm $display--text-transform--sm, | 150 | 'sm' $display--font-family--sm $display--line-height--sm $display--font-size--sm $display--font-weight--sm $display--letter-spacing--sm $display--feature-settings--sm $display--text-transform--sm $display--text-color--sm, |
| 135 | 'md' $display--font-family--md $display--line-height--md $display--font-size--md $display--font-weight--md $display--letter-spacing--md $display--feature-settings--md $display--text-transform--md, | 151 | 'md' $display--font-family--md $display--line-height--md $display--font-size--md $display--font-weight--md $display--letter-spacing--md $display--feature-settings--md $display--text-transform--md $display--text-color--md, |
| 136 | 'lg' $display--font-family--lg $display--line-height--lg $display--font-size--lg $display--font-weight--lg $display--letter-spacing--lg $display--feature-settings--lg $display--text-transform--lg, | 152 | 'lg' $display--font-family--lg $display--line-height--lg $display--font-size--lg $display--font-weight--lg $display--letter-spacing--lg $display--feature-settings--lg $display--text-transform--lg $display--text-color--lg, |
| 137 | 'xl' $display--font-family--xl $display--line-height--xl $display--font-size--xl $display--font-weight--xl $display--letter-spacing--xl $display--feature-settings--xl $display--text-transform--xl, | 153 | 'xl' $display--font-family--xl $display--line-height--xl $display--font-size--xl $display--font-weight--xl $display--letter-spacing--xl $display--feature-settings--xl $display--text-transform--xl $display--text-color--xl, |
| 138 | 'xxl' $display--font-family--xxl $display--line-height--xxl $display--font-size--xxl $display--font-weight--xxl $display--letter-spacing--xxl $display--feature-settings--xxl $display--text-transform--xxl, | 154 | 'xxl' $display--font-family--xxl $display--line-height--xxl $display--font-size--xxl $display--font-weight--xxl $display--letter-spacing--xxl $display--feature-settings--xxl $display--text-transform--xxl $display--text-color--xxl, |
| 139 | ) !default; | 155 | ) !default; |
| 156 | |||
| 157 | $static-themes: props.def(--o-heading, (), 'color'); | ||
| 158 | |||
| 159 | @each $theme in map.keys(props.get(core.$transparent-colors)) { | ||
| 160 | $heading-theme: --static-#{string.slice($theme, 3)}; | ||
| 161 | |||
| 162 | $static-themes: props.merge($static-themes, ( | ||
| 163 | $heading-theme: ( | ||
| 164 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 165 | |||
| 166 | --xxl: ( | ||
| 167 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 168 | ), | ||
| 169 | --xl: ( | ||
| 170 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 171 | ), | ||
| 172 | --lg: ( | ||
| 173 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 174 | ), | ||
| 175 | --md: ( | ||
| 176 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 177 | ), | ||
| 178 | --sm: ( | ||
| 179 | --text-color: props.get(core.$transparent-colors, $theme, --500), | ||
| 180 | ), | ||
| 181 | --xs: ( | ||
| 182 | --text-color: props.get(core.$transparent-colors, $theme, --500), | ||
| 183 | ), | ||
| 184 | |||
| 185 | --display: ( | ||
| 186 | --xxl: ( | ||
| 187 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 188 | ), | ||
| 189 | --xl: ( | ||
| 190 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 191 | ), | ||
| 192 | --lg: ( | ||
| 193 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 194 | ), | ||
| 195 | --md: ( | ||
| 196 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 197 | ), | ||
| 198 | --sm: ( | ||
| 199 | --text-color: props.get(core.$transparent-colors, $theme, --900), | ||
| 200 | ), | ||
| 201 | --xs: ( | ||
| 202 | --text-color: props.get(core.$transparent-colors, $theme, --500), | ||
| 203 | ), | ||
| 204 | ), | ||
| 205 | ) | ||
| 206 | )); | ||
| 207 | } | ||
