From 0dec90f53d3ab4214e4b5a11f82d0e5ebc339243 Mon Sep 17 00:00:00 2001 From: trashtemp <96388163+trashtemp@users.noreply.github.com> Date: Sat, 15 Jan 2022 20:56:00 +0100 Subject: [PATCH] chore: added fonts and weights, removed font + added new font-weight for Open Sans + added "Bitter" font - bye bye Bree Serif :'( --- external/lang | 2 +- package.json | 4 ++-- .../common/messaging/bars/JumpToBottom.tsx | 1 + src/components/ui/Checkbox.tsx | 2 +- src/components/ui/ComboBox.tsx | 2 +- src/components/ui/Tip.tsx | 1 + src/components/ui/fluent/CategoryButton.tsx | 6 ++++-- src/context/Theme.tsx | 14 ++++++++++---- src/pages/settings/Settings.module.scss | 2 +- src/pages/settings/panes/Native.tsx | 2 ++ yarn.lock | 14 +++++++------- 11 files changed, 31 insertions(+), 19 deletions(-) diff --git a/external/lang b/external/lang index aeb0552b..3839ed8d 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit aeb0552b66e0fa843c3a24f7c8d1797b0289199b +Subproject commit 3839ed8df3caf75ff5e26f7227c0d0ac65b7ab3b diff --git a/package.json b/package.json index 1ed3f457..53bc2773 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ } }, "dependencies": { + "@fontsource/bitter": "^4.5.0", "@insertish/vite-plugin-babel-macros": "^1.0.5", "color-rgba": "^2.3.0", "fs-extra": "^10.0.0", @@ -70,7 +71,6 @@ "devDependencies": { "@babel/plugin-proposal-decorators": "^7.16.7", "@fontsource/atkinson-hyperlegible": "^4.4.5", - "@fontsource/bree-serif": "^4.4.5", "@fontsource/comic-neue": "^4.4.5", "@fontsource/fira-code": "^4.4.5", "@fontsource/inter": "^4.4.5", @@ -79,7 +79,7 @@ "@fontsource/lexend": "^4.5.2", "@fontsource/montserrat": "^4.4.5", "@fontsource/noto-sans": "^4.4.5", - "@fontsource/open-sans": "^4.4.5", + "@fontsource/open-sans": "^4.5.2", "@fontsource/poppins": "^4.4.5", "@fontsource/raleway": "^4.4.5", "@fontsource/roboto": "^4.4.5", diff --git a/src/components/common/messaging/bars/JumpToBottom.tsx b/src/components/common/messaging/bars/JumpToBottom.tsx index 1999ece6..5ad88acf 100644 --- a/src/components/common/messaging/bars/JumpToBottom.tsx +++ b/src/components/common/messaging/bars/JumpToBottom.tsx @@ -39,6 +39,7 @@ export const Bar = styled.div<{ position: "top" | "bottom"; accent?: boolean }>` align-items: center; cursor: pointer; font-size: 12px; + font-weight: 500; padding: 0 8px; user-select: none; justify-content: space-between; diff --git a/src/components/ui/Checkbox.tsx b/src/components/ui/Checkbox.tsx index cd542ddb..e681ed92 100644 --- a/src/components/ui/Checkbox.tsx +++ b/src/components/ui/Checkbox.tsx @@ -48,7 +48,7 @@ const CheckboxContent = styled.span` const CheckboxDescription = styled.span` font-size: 0.75rem; - font-weight: 400; + font-weight: 500; color: var(--secondary-foreground); `; diff --git a/src/components/ui/ComboBox.tsx b/src/components/ui/ComboBox.tsx index f8b8378f..3267a856 100644 --- a/src/components/ui/ComboBox.tsx +++ b/src/components/ui/ComboBox.tsx @@ -5,7 +5,7 @@ export default styled.select` padding: 10px; cursor: pointer; border-radius: var(--border-radius); - + font-weight: 500; font-family: inherit; font-size: var(--text-size); color: var(--secondary-foreground); diff --git a/src/components/ui/Tip.tsx b/src/components/ui/Tip.tsx index d68d50f4..46f9e239 100644 --- a/src/components/ui/Tip.tsx +++ b/src/components/ui/Tip.tsx @@ -18,6 +18,7 @@ export const Separator = styled.div` export const TipBase = styled.div` display: flex; padding: 12px; + font-weight: 500; overflow: hidden; align-items: center; diff --git a/src/components/ui/fluent/CategoryButton.tsx b/src/components/ui/fluent/CategoryButton.tsx index 8d745b60..923d1f40 100644 --- a/src/components/ui/fluent/CategoryButton.tsx +++ b/src/components/ui/fluent/CategoryButton.tsx @@ -59,11 +59,12 @@ const CategoryBase = styled.div` font-size: 11px; `} - font-weight: 400; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; + font-weight: 500; + color: var(--secondary-foreground); a:hover { text-decoration: underline; @@ -114,7 +115,8 @@ const CategoryBase = styled.div` .description { font-size: 15px; - + font-weight: 500 !important; + color: var(--foreground); text-overflow: ellipsis; white-space: nowrap; overflow: hidden; diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx index bc934541..4c1d523e 100644 --- a/src/context/Theme.tsx +++ b/src/context/Theme.tsx @@ -49,7 +49,7 @@ export type Fonts = | "Roboto" | "Noto Sans" | "Lato" - | "Bree Serif" + | "Bitter" | "Montserrat" | "Poppins" | "Raleway" @@ -94,6 +94,7 @@ export const FONTS: Record void }> = { load: async () => { await import("@fontsource/open-sans/300.css"); await import("@fontsource/open-sans/400.css"); + await import("@fontsource/open-sans/500.css"); await import("@fontsource/open-sans/600.css"); await import("@fontsource/open-sans/700.css"); await import("@fontsource/open-sans/400-italic.css"); @@ -132,9 +133,14 @@ export const FONTS: Record void }> = { await import("@fontsource/noto-sans/400-italic.css"); }, }, - "Bree Serif": { - name: "Bree Serif", - load: () => import("@fontsource/bree-serif/400.css"), + Bitter: { + name: "Bitter", + load: async () => { + await import("@fontsource/bitter/300.css"); + await import("@fontsource/bitter/400.css"); + await import("@fontsource/bitter/600.css"); + await import("@fontsource/bitter/700.css"); + }, }, Lato: { name: "Lato", diff --git a/src/pages/settings/Settings.module.scss b/src/pages/settings/Settings.module.scss index 59d53192..ff4cc35e 100644 --- a/src/pages/settings/Settings.module.scss +++ b/src/pages/settings/Settings.module.scss @@ -238,7 +238,7 @@ h5 { margin-top: 0; font-size: 0.75rem; - font-weight: 400; + font-weight: 500; > a:hover { text-decoration: underline; diff --git a/src/pages/settings/panes/Native.tsx b/src/pages/settings/panes/Native.tsx index d07f4074..09083f1d 100644 --- a/src/pages/settings/panes/Native.tsx +++ b/src/pages/settings/panes/Native.tsx @@ -162,6 +162,8 @@ export function Native() { the app will not load! +
+ yarn dev --port 3001 }> I understand there's no going back. diff --git a/yarn.lock b/yarn.lock index cfa42d74..41c0a422 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1256,10 +1256,10 @@ resolved "https://registry.yarnpkg.com/@fontsource/atkinson-hyperlegible/-/atkinson-hyperlegible-4.5.1.tgz#7d14141d4b3f2ad6b1bd9f785fa6961c3ad28a07" integrity sha512-ohzzQVkjj9YBMZx3cmxDBPPjN1nbDU8tVbgHjD3ViDsto97ONxcegYeUA5Fa8bUpTHYhLZSRWYASSU0e96r3JQ== -"@fontsource/bree-serif@^4.4.5": +"@fontsource/bitter@^4.5.0": version "4.5.0" - resolved "https://registry.yarnpkg.com/@fontsource/bree-serif/-/bree-serif-4.5.0.tgz#89c5cc3613aaeaea7df77d909a8bbd18f8becf13" - integrity sha512-Pmegcv03v5WzV63NSdDjkFVSWnHUZv66bf1WevJIv0l3yooMFol1zxzlF32INaLcte8xTADMVbyXtSZgXb6vRQ== + resolved "https://registry.yarnpkg.com/@fontsource/bitter/-/bitter-4.5.0.tgz#002bd1caf7ad96730aec9d758f7643f11db599d8" + integrity sha512-kDOQwzCrbq1TaG3ddDnKMmudgoIDiaVtvpw+QxZ5+/iYyV+87qFlOxgZQJUBrG90RR0uD0nbFEbfTiicH9IfWA== "@fontsource/comic-neue@^4.4.5": version "4.5.0" @@ -1301,10 +1301,10 @@ resolved "https://registry.yarnpkg.com/@fontsource/noto-sans/-/noto-sans-4.5.0.tgz#179c71178678bf17e6018919c33b48ea895a86dd" integrity sha512-pYg1hJtdRJFVPkp8zCVuk5Gy42PTEeQUZSqYZHac412qV3MgOnvregHVa8Og38Z16rM61ZYwxDpuseJqS08Ifw== -"@fontsource/open-sans@^4.4.5": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@fontsource/open-sans/-/open-sans-4.5.0.tgz#e6d05dfdfe74580001010302f9c418067b45a6a9" - integrity sha512-49+A0IkTTv3cpS1YecrZNCqvlVTThUt/qioiAIZsXfgC3TqavgRqwXXvroXmhVeP/f0sqZw5CRDMS1Hj4aSTbQ== +"@fontsource/open-sans@^4.5.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/@fontsource/open-sans/-/open-sans-4.5.2.tgz#6953650035d5b42be645013b1465544d0af49d7d" + integrity sha512-aDQrW8s0KslG2aKb9nM5R6fiQR9iPomqWXf6iZCC30qv/UFlSY14SppodA3rE//+w37EqsJjyUq3BSEYzLdisg== "@fontsource/poppins@^4.4.5": version "4.5.0"