I would like to ask if there is any explanation about the variables of color configuration css. I can only get some information through ChatGPT. #6882
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
How to connect css parameters to parameters in mkdocs.yml, and where can I find relevant documentation |
Beta Was this translation helpful? Give feedback.
-
Hello @W1ndys, On the screenshoted page there is the link to the color definitions: As for the palette configuration in mkdocs.yml there is this folder: [data-md-color-accent=pink] {
--md-accent-fg-color: #f50056;
--md-accent-fg-color--transparent: #f500561a;
--md-accent-bg-color: #fff;
--md-accent-bg-color--light: #ffffffb3
}
[data-md-color-accent=purple] {
--md-accent-fg-color: #df41fb;
--md-accent-fg-color--transparent: #df41fb1a;
--md-accent-bg-color: #fff;
--md-accent-bg-color--light: #ffffffb3
}
/* ... */ The syntax for colors in the SCSS comes from this package: https://www.npmjs.com/package/material-design-color If you're asking about a visual explanation for which variable is used where on the page, I don't think there any guide of that sort. chrome_MaMBqoOTD1.mp4 |
Beta Was this translation helpful? Give feedback.
-
Thank you. Thank you very much for your help. I see. I will try to solve my problem.
|
Beta Was this translation helpful? Give feedback.
I'm still not sure what you're after, sorry. You can override the CSS with a custom-css file:
https://squidfunk.github.io/mkdocs-material/customization/#additional-css
you set the
extra_css
in the mkdocs.yml to load the file:https://www.mkdocs.org/user-guide/configuration/#extra_css
The values set in the palette section in mkdocs.yml are set in the template file on the
<body>
HTML tag: