From 5a03b61d636a66f133569e3f98851d68014b652a Mon Sep 17 00:00:00 2001 From: LoneRifle Date: Tue, 3 Jan 2023 03:11:06 +0800 Subject: [PATCH] refactor(web): remove `fonts.css`, rely on `shared-globals.css` (#6220) `styles/fonts.css` is identical to `shared-globals.css`, as found in `packages/ui/styles`, and as referenced by `styles/globals.css`. Remove `fonts.css` and its references, leaning instead on the fonts described in `shared-globals.css` Co-authored-by: Peer Richelsen --- apps/docs/pages/developer/adding-css.mdx | 3 +-- apps/web/pages/_app.tsx | 1 - apps/web/styles/fonts.css | 13 ------------- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 apps/web/styles/fonts.css diff --git a/apps/docs/pages/developer/adding-css.mdx b/apps/docs/pages/developer/adding-css.mdx index 93ed65a4b5..219d1187dd 100644 --- a/apps/docs/pages/developer/adding-css.mdx +++ b/apps/docs/pages/developer/adding-css.mdx @@ -14,14 +14,13 @@ Cal.com uses [TailwindCSS](https://tailwindcss.com) as a replacement for traditi CSS files should be stored in the `styles` directory within the codebase. -Within the `styles` directory, you will find two CSS files, `fonts.css` and `global.css`. We suggest not to add to these files, and instead create new CSS files and import them into the application. This helps reduce conflicts when pulling in changes that we've made to either of the existing CSS files. +Within the `styles` directory, you will find a single CSS file, `global.css`. We suggest not to add to this file, and instead create new CSS files and import them into the application. This helps reduce conflicts when pulling in changes that we've made to either of the existing CSS files. ## Adding new stylesheets Firstly, create the CSS file inside the `styles` directory. Then, open the `pages/_app.tsx` file, and you will see the following two lines: ```javascript -import "../styles/fonts.css"; import "../styles/globals.css"; ``` diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx index 07ef01a5b5..b65b54961f 100644 --- a/apps/web/pages/_app.tsx +++ b/apps/web/pages/_app.tsx @@ -20,7 +20,6 @@ import { seoConfig } from "@lib/config/next-seo.config"; import I18nLanguageHandler from "@components/I18nLanguageHandler"; -import "../styles/fonts.css"; import "../styles/globals.css"; function MyApp(props: AppProps) { diff --git a/apps/web/styles/fonts.css b/apps/web/styles/fonts.css deleted file mode 100644 index f47d80cf8e..0000000000 --- a/apps/web/styles/fonts.css +++ /dev/null @@ -1,13 +0,0 @@ -@font-face { - font-family: "Cal Sans"; - src: url("/fonts/cal.ttf"); -} - -@font-face { - font-family: "Inter var"; - font-weight: 100 900; - font-display: swap; - font-style: normal; - font-named-instance: "Regular"; - src: url("/fonts/Inter-roman.var.woff2") format("woff2"); -}