From 9f69cb73b09086c6dff761a4f7cfcae2b86e11ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 13 Oct 2024 00:48:04 +0200 Subject: [PATCH] theme: make users with font changes accountable #922 --- assets/css/theme-blue.css | 1 - assets/css/theme-green.css | 1 - assets/css/theme-learn.css | 1 - assets/css/theme-neon.css | 1 - assets/css/theme-red.css | 1 - assets/css/theme-relearn-bright.css | 1 - assets/css/theme-relearn-dark.css | 1 - assets/css/theme-relearn-light.css | 2 -- assets/css/theme-zen-dark.css | 1 - assets/css/theme-zen-light.css | 1 - assets/css/variables.css | 2 +- exampleSite/content/introduction/releasenotes/7/0.en.md | 4 +++- layouts/partials/version.txt | 2 +- 13 files changed, 5 insertions(+), 14 deletions(-) diff --git a/assets/css/theme-blue.css b/assets/css/theme-blue.css index acd4ae9cb0..afab8fc2a7 100644 --- a/assets/css/theme-blue.css +++ b/assets/css/theme-blue.css @@ -5,7 +5,6 @@ --MAIN-LINK-color: rgba( 28, 144, 243, 1 ); /* Color of links */ --MAIN-LINK-HOVER-color: rgba( 22, 122, 208, 1 ); /* Color of hovered links */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* color of text by default */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: learn; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 226, 228, 229, 1 ); /* fallback color for code text */ diff --git a/assets/css/theme-green.css b/assets/css/theme-green.css index 1b602e2bbf..b2d0cca75c 100644 --- a/assets/css/theme-green.css +++ b/assets/css/theme-green.css @@ -5,7 +5,6 @@ --MAIN-LINK-color: rgba( 89, 154, 62, 1 ); /* Color of links */ --MAIN-LINK-HOVER-color: rgba( 63, 109, 44, 1 ); /* Color of hovered links */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* color of text by default */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: learn; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 226, 228, 229, 1 ); /* fallback color for code text */ diff --git a/assets/css/theme-learn.css b/assets/css/theme-learn.css index cd5221dce1..28223ce19f 100644 --- a/assets/css/theme-learn.css +++ b/assets/css/theme-learn.css @@ -5,7 +5,6 @@ --MAIN-LINK-color: rgba( 0, 189, 243, 1 ); /* Color of links */ --MAIN-LINK-HOVER-color: rgba( 0, 130, 167, 1 ); /* Color of hovered links */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* color of text by default */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: learn; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 226, 228, 229, 1 ); /* fallback color for code text */ diff --git a/assets/css/theme-neon.css b/assets/css/theme-neon.css index c6d1e1a0a1..259c90822a 100644 --- a/assets/css/theme-neon.css +++ b/assets/css/theme-neon.css @@ -6,7 +6,6 @@ --MAIN-TEXT-color: rgba( 224, 224, 224, 1 ); /* text color of content and h1 titles */ --MAIN-LINK-HOVER-color: rgb( 80, 215, 255, 1 ); /* hovered link color of content */ --MAIN-BG-color: rgba( 16, 16, 16, 1 ); /* background color of content */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ /* optional overwrites for specific headers */ --MAIN-TITLES-TEXT-color: rgba( 243, 0, 178, 1 ); /* text color of h2-h6 titles and transparent box titles */ diff --git a/assets/css/theme-red.css b/assets/css/theme-red.css index 5e17236798..27ccc359ab 100644 --- a/assets/css/theme-red.css +++ b/assets/css/theme-red.css @@ -5,7 +5,6 @@ --MAIN-LINK-color: rgba( 243, 28, 28, 1 ); /* Color of links */ --MAIN-LINK-HOVER-color: rgba( 208, 22, 22, 1 ); /* Color of hovered links */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* color of text by default */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: learn; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 226, 228, 229, 1 ); /* fallback color for code text */ diff --git a/assets/css/theme-relearn-bright.css b/assets/css/theme-relearn-bright.css index 5c95fa7ba9..343702bf96 100644 --- a/assets/css/theme-relearn-bright.css +++ b/assets/css/theme-relearn-bright.css @@ -7,7 +7,6 @@ --MAIN-LINK-HOVER-color: rgba( 32, 40, 145, 1 ); /* hovered link color of content */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* background color of content */ --MAIN-TITLES-TEXT-color: rgba( 16, 16, 16, 1 ); /* text color of h2-h6 titles and transparent box titles */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: relearn-light; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 39, 40, 34, 1 ); /* fallback text color of block code; should be adjusted to your selected chroma style */ diff --git a/assets/css/theme-relearn-dark.css b/assets/css/theme-relearn-dark.css index dfd3d21cf1..3827132371 100644 --- a/assets/css/theme-relearn-dark.css +++ b/assets/css/theme-relearn-dark.css @@ -7,7 +7,6 @@ --MAIN-LINK-HOVER-color: rgba( 147, 176, 255, 1 ); /* hovered link color of content */ --MAIN-BG-color: rgba( 32, 32, 32, 1 ); /* background color of content */ --MAIN-TITLES-TEXT-color: rgba( 255, 255, 255, 1 ); /* text color of h2-h6 titles and transparent box titles */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: relearn-dark; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 248, 248, 242, 1 ); /* fallback text color of block code; should be adjusted to your selected chroma style */ diff --git a/assets/css/theme-relearn-light.css b/assets/css/theme-relearn-light.css index 9a5c59267c..1581592d29 100644 --- a/assets/css/theme-relearn-light.css +++ b/assets/css/theme-relearn-light.css @@ -7,8 +7,6 @@ --MAIN-LINK-HOVER-color: rgba( 32, 40, 145, 1 ); /* hovered link color of content */ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* background color of content */ --MAIN-TITLES-TEXT-color: rgba( 16, 16, 16, 1 ); /* text color of h2-h6 titles and transparent box titles */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: relearn-light; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 39, 40, 34, 1 ); /* fallback text color of block code; should be adjusted to your selected chroma style */ diff --git a/assets/css/theme-zen-dark.css b/assets/css/theme-zen-dark.css index ade2b081ef..f3d8eed069 100644 --- a/assets/css/theme-zen-dark.css +++ b/assets/css/theme-zen-dark.css @@ -7,7 +7,6 @@ --MAIN-BG-color: rgba( 32, 32, 32, 1 ); /* background color of content */ --MAIN-TEXT-color: rgba( 224, 224, 224, 1 ); /* text color of content and h1 titles */ --MAIN-TITLES-TEXT-color: rgba( 255, 255, 255, 1 ); /* text color of h2-h6 titles and transparent box titles */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: relearn-dark; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 248, 248, 242, 1 ); /* fallback text color of block code; should be adjusted to your selected chroma style */ diff --git a/assets/css/theme-zen-light.css b/assets/css/theme-zen-light.css index de0f8a8a9f..4da24f98b9 100644 --- a/assets/css/theme-zen-light.css +++ b/assets/css/theme-zen-light.css @@ -7,7 +7,6 @@ --MAIN-BG-color: rgba( 255, 255, 255, 1 ); /* background color of content */ --MAIN-TEXT-color: rgba( 0, 0, 0, 1 ); /* text color of content and h1 titles */ --MAIN-TITLES-TEXT-color: rgba( 16, 16, 16, 1 ); /* text color of h2-h6 titles and transparent box titles */ - --MAIN-BOLD-font-weight: 800; /* font weight for bold text */ --CODE-theme: relearn-light; /* name of the chroma stylesheet file */ --CODE-BLOCK-color: rgba( 39, 40, 34, 1 ); /* fallback text color of block code; should be adjusted to your selected chroma style */ diff --git a/assets/css/variables.css b/assets/css/variables.css index 2ee5de18b3..341e593802 100644 --- a/assets/css/variables.css +++ b/assets/css/variables.css @@ -8,7 +8,7 @@ --INTERNAL-MAIN-LINK-color: var(--MAIN-LINK-color, var(--SECONDARY-color, rgba( 72, 106, 201, 1 ))); /* not --INTERNAL-SECONDARY-color */ --INTERNAL-MAIN-LINK-HOVER-color: var(--MAIN-LINK-HOVER-color, var(--INTERNAL-MAIN-LINK-color)); --INTERNAL-MAIN-BG-color: var(--MAIN-BG-color, rgba( 255, 255, 255, 1 )); - --INTERNAL-MAIN-BOLD-font-weight: var(--MAIN-BOLD-font-weight, 700); + --INTERNAL-MAIN-BOLD-font-weight: var(--MAIN-BOLD-font-weight, 800); --INTERNAL-MAIN-TEXT-color: var(--MAIN-TEXT-color, rgba( 16, 16, 16, 1 )); --INTERNAL-MAIN-font: var(--MAIN-font, "Roboto Flex", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif); diff --git a/exampleSite/content/introduction/releasenotes/7/0.en.md b/exampleSite/content/introduction/releasenotes/7/0.en.md index fc1b9a0f83..5662584739 100644 --- a/exampleSite/content/introduction/releasenotes/7/0.en.md +++ b/exampleSite/content/introduction/releasenotes/7/0.en.md @@ -57,7 +57,9 @@ weight = -0 Although the font was created by Google, it is licensed under OFL 1.1 and is delivered from your theme's installation. As always, no third-party server calls are involved. - If you have overridden the font to a [variable font](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/Variable_fonts_guide#variable_fonts_what_they_are_and_how_they_differ) in your installation either by hacking the CSS directly or by using any of the mechanisms provided by the theme, you may have to adjust your CSS value for `font-variations-settings`. As it only applies to **variable fonts**, this should rarely be necessary. + If you have changed the `font-family` in your installation, you most likely have to adjust the variables `--MAIN-font-weight`, `--MAIN-BOLD-font-weight` and `--MAIN-letter-spacing`. + + Additionally, if you have changed the font to a [variable font](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/Variable_fonts_guide#variable_fonts_what_they_are_and_how_they_differ) in your installation, you may have to adjust the variable `--MAIN-font-variation-settings`. As this only applies to **variable fonts**, this should rarely be necessary. - {{% badge style="note" title=" " %}}Change{{% /badge %}} While switching the font, it was discovered that certain CSS variables were falsely named. You don't need to change anything in your custom variant stylesheet as the old names will be used as a fallback. diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index cf85047523..7bb68b66a4 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -6.4.0+2061495d2ef76ac68786724de89fd9f62b162cca \ No newline at end of file +6.4.0+d1e5e8e309baf14db97af3f031141f44e93f4315 \ No newline at end of file