From 719503e15b8495d54cd18f1950c85a306ec42e19 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:21:09 -0600 Subject: [PATCH] Inherit font stack everywhere Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> --- sticker-creator/src/fonts.scss | 6 ------ sticker-creator/src/index.scss | 9 +++++++++ stylesheets/_global.scss | 9 +++++++++ stylesheets/_mixins.scss | 7 ------- stylesheets/components/ConversationDetails.scss | 2 +- stylesheets/components/Preferences.scss | 2 ++ 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/sticker-creator/src/fonts.scss b/sticker-creator/src/fonts.scss index 5b558837e3..877662e58f 100644 --- a/sticker-creator/src/fonts.scss +++ b/sticker-creator/src/fonts.scss @@ -14,7 +14,6 @@ $inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, } @mixin font-title-1 { - @include font-family; font-weight: 600; font-size: 26px; line-height: 32px; @@ -22,7 +21,6 @@ $inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, } @mixin font-title-2 { - @include font-family; font-weight: 600; font-size: 20px; line-height: 26px; @@ -30,7 +28,6 @@ $inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, } @mixin font-body-1 { - @include font-family; font-size: 14px; line-height: 20px; letter-spacing: -0.08px; @@ -50,7 +47,6 @@ $inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, } @mixin font-body-2 { - @include font-family; font-size: 13px; line-height: 18px; letter-spacing: -0.03px; @@ -74,14 +70,12 @@ $inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, } @mixin font-subtitle { - @include font-family; font-size: 12px; line-height: 16px; letter-spacing: 0; } @mixin font-caption { - @include font-family; font-size: 11px; line-height: 14px; letter-spacing: 0.06px; diff --git a/sticker-creator/src/index.scss b/sticker-creator/src/index.scss index a2cb46de50..f3bfff7a8d 100644 --- a/sticker-creator/src/index.scss +++ b/sticker-creator/src/index.scss @@ -24,6 +24,7 @@ body { width: 100%; margin: 0; + @include font-family; @include font-body-1; @include light-theme() { @@ -36,6 +37,14 @@ body { } } +input, +button, +select, +optgroup, +textarea { + font-family: inherit; +} + button { cursor: pointer; font-size: inherit; diff --git a/stylesheets/_global.scss b/stylesheets/_global.scss index b847e4f9d8..be5d959f04 100644 --- a/stylesheets/_global.scss +++ b/stylesheets/_global.scss @@ -18,6 +18,7 @@ body { color: $color-gray-90; + @include font-family; @include font-body-1; &.light-theme { @@ -34,6 +35,14 @@ body { } } +input, +button, +select, +optgroup, +textarea { + font-family: inherit; +} + [contenteditable] { -webkit-user-modify: read-write-plaintext-only; } diff --git a/stylesheets/_mixins.scss b/stylesheets/_mixins.scss index 15a5687f0f..6c27ecce85 100644 --- a/stylesheets/_mixins.scss +++ b/stylesheets/_mixins.scss @@ -33,7 +33,6 @@ } @mixin font-title-1 { - @include font-family; font-weight: 600; font-size: 26px; line-height: 32px; @@ -41,7 +40,6 @@ } @mixin font-title-2 { - @include font-family; font-weight: 600; font-size: 20px; line-height: 26px; @@ -49,7 +47,6 @@ } @mixin font-title-medium { - @include font-family; font-weight: 600; font-size: 18px; line-height: 25px; @@ -57,7 +54,6 @@ } @mixin font-body-1 { - @include font-family; font-size: 14px; line-height: 20px; letter-spacing: -0.08px; @@ -77,7 +73,6 @@ } @mixin font-body-2 { - @include font-family; font-size: 13px; line-height: 18px; letter-spacing: -0.03px; @@ -101,7 +96,6 @@ } @mixin font-subtitle { - @include font-family; font-size: 12px; line-height: 16px; letter-spacing: 0; @@ -112,7 +106,6 @@ } @mixin font-caption { - @include font-family; font-size: 11px; line-height: 14px; letter-spacing: 0.06px; diff --git a/stylesheets/components/ConversationDetails.scss b/stylesheets/components/ConversationDetails.scss index 7b8f898f67..905c1fee2e 100644 --- a/stylesheets/components/ConversationDetails.scss +++ b/stylesheets/components/ConversationDetails.scss @@ -300,6 +300,7 @@ padding-inline: 24px; user-select: none; width: 100%; + @include font-body-2; &--button { color: inherit; @@ -350,7 +351,6 @@ } &__info { - @include font-body-2; margin-top: 4px; @include light-theme { diff --git a/stylesheets/components/Preferences.scss b/stylesheets/components/Preferences.scss index 8d54950523..76eb550507 100644 --- a/stylesheets/components/Preferences.scss +++ b/stylesheets/components/Preferences.scss @@ -315,6 +315,7 @@ .Preferences__LanguageButton { @include button-reset; + @include localized-fonts; } .Preferences__LanguageModal { @@ -401,6 +402,7 @@ .Preferences__LanguageModal__Item__Matching { display: block; + @include localized-fonts; @include font-body-2; @include light-theme { color: $color-gray-60;