From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1737249140; bh=CNJr/OcMFdNySjl3w9cwge96LLhWV4O4TO3rOKCJY0g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=r+ZunVDWJg19yPzvrMi1O87bIHs0a9Iw9IOQLDbfCtxAT0bsNyAmWKPq9dUwNJls+ 0kCVupZRthKR3NF3KOXpSdnkBA4vkW6V6k5eUzRx02AjdwQeIEFz7GQ8pgmt0e1MIR LoDYDTdSurh2Yzy1QnBa5v+rf8DXW9J4/SN99IqE6WBtsofND8q53exPm2HEV96mnN BQdGgq1nQVn0spJIL2zhtZD1clIbolSoKRAEsbvZz08y9pQxCZoocI6tnngc2xVFII MMTlytUTznGf3gbmyvuEOAQWAkcr42Yi/Qf2jLnF0dcpdbKVeado1+ZXoBHLJLn6aQ OuKMdUZmHRDUA== Received: from localhost.localdomain (unknown [101.128.125.239]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id BDD2E2061C33; Sun, 19 Jan 2025 01:12:18 +0000 (UTC) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Dwiky Rizky Ananditya , GNU/Weeb Mailing List Subject: [PATCH v1 03/17] feat(fonts): add Google fonts Date: Sun, 19 Jan 2025 08:11:20 +0700 Message-ID: <20250119011136.1254-4-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.45.2.windows.1 In-Reply-To: <20250119011136.1254-1-kiizuha@gnuweeb.org> References: <20250119011136.1254-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Import Google Fonts using CSS `@import` and configure the font families in `app.css` and `tailwind.config.ts`. Signed-off-by: Muhammad Rizki --- src/app.css | 18 ++++++++++++++++++ tailwind.config.ts | 9 ++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/app.css b/src/app.css index b5c61c9..c6c01f0 100644 --- a/src/app.css +++ b/src/app.css @@ -1,3 +1,21 @@ +@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"); + @tailwind base; @tailwind components; @tailwind utilities; + +@layer base { + html { + font-family: + Inter, + Rubik, + Geist, + ui-sans-serif, + system-ui, + sans-serif, + Apple Color Emoji, + Segoe UI Emoji, + Segoe UI Symbol, + Noto Color Emoji; + } +} diff --git a/tailwind.config.ts b/tailwind.config.ts index 494061d..4cd2f8d 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -2,12 +2,19 @@ import containerQueries from "@tailwindcss/container-queries"; import forms from "@tailwindcss/forms"; import typography from "@tailwindcss/typography"; import type { Config } from "tailwindcss"; +import defaultTheme from "tailwindcss/defaultTheme"; export default { content: ["./src/**/*.{html,js,svelte,ts}"], theme: { - extend: {} + extend: { + fontFamily: { + inter: ["Inter", "Rubik", "Geist", ...defaultTheme.fontFamily.sans], + rubik: ["Rubik", "Inter", "Geist", ...defaultTheme.fontFamily.sans], + geist: ["Geist", "Inter", "Rubik", ...defaultTheme.fontFamily.sans] + } + } }, plugins: [typography, forms, containerQueries] -- Muhammad Rizki