From c6804d93a6f96294f36c9c79fce557eac3940f67 Mon Sep 17 00:00:00 2001 From: Fynn Feldpausch Date: Fri, 27 Oct 2023 09:12:29 +0200 Subject: [PATCH] fix(tokens)!: rename --font-family-body to font-family-base --- core/src/styles/core/_base.scss | 2 +- core/src/styles/core/_typography.scss | 2 + core/src/styles/utils/_typography.mixins.scss | 3 +- pnpm-lock.yaml | 63 +++++++++++++++++++ tokens/dist/export/figma.json | 6 +- tokens/dist/export/theme.json | 6 +- tokens/dist/export/zeroheight.json | 6 +- tokens/src/font.json | 9 +-- 8 files changed, 72 insertions(+), 25 deletions(-) diff --git a/core/src/styles/core/_base.scss b/core/src/styles/core/_base.scss index 7c3cc35c..a284d293 100644 --- a/core/src/styles/core/_base.scss +++ b/core/src/styles/core/_base.scss @@ -8,6 +8,6 @@ body { body { @include cat-body('m'); - font-family: cat-token('font.family.body'), $font-fallback-base, cat-token('font.family.emoji'), $font-fallback-emoji; + font-family: cat-token('font.family.base'), $font-fallback-base, cat-token('font.family.emoji'), $font-fallback-emoji; color: cat-token('color.ui.font.base'); } diff --git a/core/src/styles/core/_typography.scss b/core/src/styles/core/_typography.scss index 98923684..53aa134d 100644 --- a/core/src/styles/core/_typography.scss +++ b/core/src/styles/core/_typography.scss @@ -217,6 +217,7 @@ code { :where(h1, h2, h3), :is(.cat-h1, .cat-h2, .cat-h3) { color: $cat-font-color-head; + font-family: $cat-font-family-head, $font-fallback-base, cat-token('font.family.emoji'), $font-fallback-emoji; margin-bottom: calc($cat-head-margin-bottom * var(--cat-article-spacer, 1)); &:has(+ h1, + h2, + h3, + h4, + h5, + h6, + .cat-h1, + .cat-h2, + .cat-h3, + .cat-h4, + .cat-h5, + .cat-h6) { @@ -227,6 +228,7 @@ code { :where(h4, h5, h6), :is(.cat-h4, .cat-h5, .cat-h6) { color: $cat-font-color-head; + font-family: $cat-font-family-head, $font-fallback-base, cat-token('font.family.emoji'), $font-fallback-emoji; margin-bottom: calc($cat-head-margin-bottom * 0.5 * var(--cat-article-spacer, 1)); } diff --git a/core/src/styles/utils/_typography.mixins.scss b/core/src/styles/utils/_typography.mixins.scss index 5888e3de..3b28f18d 100644 --- a/core/src/styles/utils/_typography.mixins.scss +++ b/core/src/styles/utils/_typography.mixins.scss @@ -11,8 +11,7 @@ } @mixin cat-head($size, $weight: cat-token('font.weight.head')) { - // skip color, as it is only set for editorial styles - font-family: $cat-font-family-head, $font-fallback-base, cat-token('font.family.emoji'), $font-fallback-emoji; + // skip color and family, as it is only set for editorial styles font-size: cat-head-font-size($size); line-height: cat-head-line-height($size); font-weight: $weight; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f67f07f5..c1706406 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,6 +109,42 @@ importers: specifier: ~4.6.3 version: 4.6.3 + angular/dist/catalyst: + dependencies: + '@angular/cdk': + specifier: ^14.0.0 || ^15.0.0 || ^16.0.0 + version: 14.2.7(@angular/common@14.3.0)(@angular/core@14.2.7)(rxjs@7.8.1) + '@angular/core': + specifier: ^14.0.0 || ^15.0.0 || ^16.0.0 + version: 14.2.7(rxjs@7.8.1)(zone.js@0.11.8) + '@haiilo/catalyst': + specifier: workspace:* + version: link:../../../core + '@haiilo/catalyst-tokens': + specifier: workspace:* + version: link:../../../tokens + loglevel: + specifier: 1.8.1 + version: 1.8.1 + rxjs: + specifier: ^6.5.3 || ^7.4.0 + version: 7.8.1 + tslib: + specifier: ^2.3.0 + version: 2.6.1 + + angular/dist/catalyst-formly: + dependencies: + '@angular/core': + specifier: ^14.0.0 || ^15.0.0 || ^16.0.0 + version: 14.2.7(rxjs@7.8.1)(zone.js@0.11.8) + '@haiilo/catalyst-angular': + specifier: workspace:* + version: link:../../projects/catalyst + tslib: + specifier: ^2.3.0 + version: 2.6.1 + angular/projects/catalyst: dependencies: '@angular/cdk': @@ -547,6 +583,21 @@ packages: parse5: 5.1.1 dev: false + /@angular/cdk@14.2.7(@angular/common@14.3.0)(@angular/core@14.2.7)(rxjs@7.8.1): + resolution: {integrity: sha512-/tEsYaUbDSnfEmKVvAMramIptmhI67O+9STjOV0i+74XR2NospeK0fkbywIANu1n3w6AHGMotvRWJrjmbCElFg==} + peerDependencies: + '@angular/common': ^14.0.0 || ^15.0.0 + '@angular/core': ^14.0.0 || ^15.0.0 + rxjs: ^6.5.3 || ^7.4.0 + dependencies: + '@angular/common': 14.3.0(@angular/core@14.2.7)(rxjs@7.8.1) + '@angular/core': 14.2.7(rxjs@7.8.1)(zone.js@0.11.8) + rxjs: 7.8.1 + tslib: 2.6.1 + optionalDependencies: + parse5: 5.1.1 + dev: false + /@angular/cli@14.2.7: resolution: {integrity: sha512-RM4CJwtqD7cKFQ7hNGJ56s9YMeJxYqCN5Ss0SzsKN1nXYqz8HykMW8fhUbZQ9HFVy/Ml3LGoh1yGo/tXywAWcA==} engines: {node: ^14.15.0 || >=16.10.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} @@ -602,6 +653,18 @@ packages: tslib: 2.6.1 dev: false + /@angular/common@14.3.0(@angular/core@14.2.7)(rxjs@7.8.1): + resolution: {integrity: sha512-pV9oyG3JhGWeQ+TFB0Qub6a1VZWMNZ6/7zEopvYivdqa5yDLLDSBRWb6P80RuONXyGnM1pa7l5nYopX+r/23GQ==} + engines: {node: ^14.15.0 || >=16.10.0} + peerDependencies: + '@angular/core': 14.3.0 + rxjs: ^6.5.3 || ^7.4.0 + dependencies: + '@angular/core': 14.2.7(rxjs@7.8.1)(zone.js@0.11.8) + rxjs: 7.8.1 + tslib: 2.6.1 + dev: false + /@angular/compiler-cli@14.2.7(@angular/compiler@14.2.7)(typescript@4.6.3): resolution: {integrity: sha512-q6AQo91jc+Pd1PnWWxJq07IXr1yipq0MW3Uok5akEctbTsw4AT5y9wfPj6g/o/CkAz0kbL55QrmtyIWN5LMGdg==} engines: {node: ^14.15.0 || >=16.10.0} diff --git a/tokens/dist/export/figma.json b/tokens/dist/export/figma.json index ee7be88e..b1a468ec 100644 --- a/tokens/dist/export/figma.json +++ b/tokens/dist/export/figma.json @@ -607,11 +607,7 @@ }, "font": { "family": { - "head": { - "$type": "fontFamily", - "$value": "Lato" - }, - "body": { + "base": { "$type": "fontFamily", "$value": "Lato" }, diff --git a/tokens/dist/export/theme.json b/tokens/dist/export/theme.json index e0955b01..75a46fab 100644 --- a/tokens/dist/export/theme.json +++ b/tokens/dist/export/theme.json @@ -223,11 +223,7 @@ "$type": "color", "$value": "#ffffff" }, - "font-family-head": { - "$type": "fontFamily", - "$value": "Lato" - }, - "font-family-body": { + "font-family-base": { "$type": "fontFamily", "$value": "Lato" }, diff --git a/tokens/dist/export/zeroheight.json b/tokens/dist/export/zeroheight.json index f6a98190..7b903864 100644 --- a/tokens/dist/export/zeroheight.json +++ b/tokens/dist/export/zeroheight.json @@ -785,11 +785,7 @@ }, "font": { "family": { - "head": { - "$type": "fontFamily", - "$value": "Lato" - }, - "body": { + "base": { "$type": "fontFamily", "$value": "Lato" }, diff --git a/tokens/src/font.json b/tokens/src/font.json index 4bdee3cd..699f1003 100644 --- a/tokens/src/font.json +++ b/tokens/src/font.json @@ -1,15 +1,10 @@ { "font": { "family": { - "head": { - "$type": "fontFamily", - "$value": "{asset.font.lato.name.value}", - "cssProp": "font-family-head" - }, - "body": { + "base": { "$type": "fontFamily", "$value": "{asset.font.lato.name.value}", - "cssProp": "font-family-body" + "cssProp": "font-family-base" }, "mono": { "$type": "fontFamily",