From ebb51731f6676ed8a40aed324cecb5b265cc16de Mon Sep 17 00:00:00 2001 From: David Murdoch Date: Thu, 30 Jan 2025 19:54:20 +0000 Subject: [PATCH] templates: remove unknown CSS values (#10891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * set font-size to unset * set font-weight to unset ### What? Change CSS values in global.css files in 3 examples ### Why? Apparently, the CSS value of `auto` does not actually exist in CSS for `font-size` and `font-weight` [mdn](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size#syntax) . [Stylelint](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown/) errors made me aware of this. That rule's description is not specific to `font-size` and `font-weight`. This is how it looked in the terminal: ``` src/app/(frontend)/globals.css 12:18 ✖ Unexpected unknown value "auto" for property "font-weight" declaration-property-value-no-unknown 13:16 ✖ Unexpected unknown value "auto" for property "font-size" declaration-property-value-no-unknown ``` ### Fixes: Change `auto` to `unset` since it uses `initial` styles unless the heading CSS values have been changed by a parent html tag. I'm guessing this was reset due to tailwind interrupting this somehow. --- examples/localization/src/app/(frontend)/[locale]/globals.css | 4 ++-- templates/website/src/app/(frontend)/globals.css | 4 ++-- templates/with-vercel-website/src/app/(frontend)/globals.css | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/localization/src/app/(frontend)/[locale]/globals.css b/examples/localization/src/app/(frontend)/[locale]/globals.css index 13be9b73ce..9875359bcd 100644 --- a/examples/localization/src/app/(frontend)/[locale]/globals.css +++ b/examples/localization/src/app/(frontend)/[locale]/globals.css @@ -9,8 +9,8 @@ h4, h5, h6 { - font-size: auto; - font-weight: auto; + font-size: unset; + font-weight: unset; } :root { diff --git a/templates/website/src/app/(frontend)/globals.css b/templates/website/src/app/(frontend)/globals.css index fb3fc69b83..2c785c1da0 100644 --- a/templates/website/src/app/(frontend)/globals.css +++ b/templates/website/src/app/(frontend)/globals.css @@ -9,8 +9,8 @@ h4, h5, h6 { - font-size: auto; - font-weight: auto; + font-size: unset; + font-weight: unset; } :root { diff --git a/templates/with-vercel-website/src/app/(frontend)/globals.css b/templates/with-vercel-website/src/app/(frontend)/globals.css index fb3fc69b83..2c785c1da0 100644 --- a/templates/with-vercel-website/src/app/(frontend)/globals.css +++ b/templates/with-vercel-website/src/app/(frontend)/globals.css @@ -9,8 +9,8 @@ h4, h5, h6 { - font-size: auto; - font-weight: auto; + font-size: unset; + font-weight: unset; } :root {