From ac692f68624a2ed7df5fba8bcc46a63a47e6da9c Mon Sep 17 00:00:00 2001 From: Jason Schulz Date: Mon, 29 Apr 2024 11:52:14 -0400 Subject: [PATCH 1/2] Fixes: Match ChatGPT fonts #286 * chore(styles): update font and font size in application.tailwind.css * chore(views): update font in application/_head.html.erb * chore(config): update font in tailwind.config.js --- app/assets/stylesheets/application.tailwind.css | 3 +++ app/views/application/_head.html.erb | 2 +- config/tailwind.config.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 109445cd8..791ecb233 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -159,6 +159,9 @@ input:focus { @layer base { html { @apply h-full overscroll-none; + font-size: 70%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } body { @apply h-full font-sans text-gray-950 dark:text-gray-100 flex overflow-y-auto; diff --git a/app/views/application/_head.html.erb b/app/views/application/_head.html.erb index 593ba4734..27c02be7c 100644 --- a/app/views/application/_head.html.erb +++ b/app/views/application/_head.html.erb @@ -7,7 +7,7 @@ <%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/daisyui@4.6.0/dist/full.min.css" %> <%# daisyui (^) is declared above application (v) so we can override classes from it %> <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> - <%= stylesheet_link_tag "application", 'https://fonts.googleapis.com/css?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap', "data-turbo-track": "reload" %> + <%= stylesheet_link_tag "application", 'https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap', "data-turbo-track": "reload" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_importmap_tags %> <%= turbo_refreshes_with method: :morph, scroll: :preserve %> diff --git a/config/tailwind.config.js b/config/tailwind.config.js index 9fe2c9bde..0c1f0c5ff 100644 --- a/config/tailwind.config.js +++ b/config/tailwind.config.js @@ -10,7 +10,7 @@ module.exports = { theme: { extend: { fontFamily: { - sans: ['Inter var', ...defaultTheme.fontFamily.sans], + sans: ['Figtree', ...defaultTheme.fontFamily.sans], }, colors: { 'gray': { From 5647b5bc1fd9eb8e94ccc471f233151140a10c3c Mon Sep 17 00:00:00 2001 From: Jason Schulz Date: Mon, 29 Apr 2024 12:01:23 -0400 Subject: [PATCH 2/2] * style(application.tailwind.css): remove font-size property from html element in base layer --- app/assets/stylesheets/application.tailwind.css | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 791ecb233..d59133582 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -159,7 +159,6 @@ input:focus { @layer base { html { @apply h-full overscroll-none; - font-size: 70%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }