Closed MSohm closed 1 month ago
I'm fairly sure this is because of https://github.com/facebook/docusaurus/issues/9303. The problem is not with --ifm-color-primary
(everyone uses it including ourselves so the chance of it not working is 0). It's with the CSS nesting syntax you are using, which invalidates :root
. It works once you take them out.
yes that looks like it's the same CSS nesting issue
I found the root cause was an incorrect path to the font. If I change:
@font-face {
font-family: 'Figtree';
src: url('/static/fonts/Figtree/Figtree-VariableFont_wght.ttf') format('truetype');
font-weight: 200 900;
font-stretch: 75% 125%;
}
To (remove static from the path)
@font-face {
font-family: 'Figtree';
src: url('/fonts/Figtree/Figtree-VariableFont_wght.ttf') format('truetype');
font-weight: 200 900;
font-stretch: 75% 125%;
}
It works.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
The custom theme colours (and possibly other CSS) is not applied after
yarn build
. The custom css is used foryarn start
. If I set the environment variableUSE_SIMPLE_CSS_MINIFIER
totrue
, the custom css is available in the production build.Workaround Sent the environment variable
USE_SIMPLE_CSS_MINIFIER
to true.Reproducible demo
CodeSandbox-Demo
Steps to reproduce
Steps to Reproduce
USE_SIMPLE_CSS_MINIFIER
is not set (or set to false).yarn start
and observe the hero background and links are orange.yarn build
yarn serve
Expected behavior
The hero background and links are orange.
Actual behavior
The hero background and links are blue.
Your environment
Self-service