From fd7ad8a2f2600373a71aa3297e6ab84e828151c0 Mon Sep 17 00:00:00 2001 From: jbpenrath Date: Fri, 11 Aug 2023 14:51:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84(react)=20do=20not=20apply=20font-f?= =?UTF-8?q?amily=20to=20all=20elements=20with=20`*`=20selector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, `react` package use `*` selector to enforce the font family to all elements. That is weird as all elements are not able anymore to inherit their font-family from their parent. In order to enforce the use of font-family base by default without breaking the parent inheritance, we apply font-family to the body element instead. Fix #137 --- .changeset/tasty-hornets-switch.md | 5 +++++ packages/react/src/index.scss | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tasty-hornets-switch.md diff --git a/.changeset/tasty-hornets-switch.md b/.changeset/tasty-hornets-switch.md new file mode 100644 index 0000000..b1dff4e --- /dev/null +++ b/.changeset/tasty-hornets-switch.md @@ -0,0 +1,5 @@ +--- +"@openfun/cunningham-react": patch +--- + +Do not apply font-family to all elements with `*` selector diff --git a/packages/react/src/index.scss b/packages/react/src/index.scss index f418f70..a732e07 100644 --- a/packages/react/src/index.scss +++ b/packages/react/src/index.scss @@ -17,6 +17,6 @@ @import './components/Pagination'; @import './components/Popover'; -* { +body { font-family: var(--c--theme--font--families--base); }