Skip to content

Custom colours not working #8526

@lukecharle

Description

@lukecharle

Context

No response

Bug description

So I've followed the steps here:

https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors

I have the following for the theme block in my mkdocs.yml:

theme:
  name: material
  palette:
    primary: custom
  extra_css:
    - stylesheets/extra.css
  features:
    - navigation.tabs
    - navigation.sections
    - navigation.expand
    - navigation.top
    - search.suggest
    - search.highlight
    - content.code.annotate
    - content.code.copy

And then use the following in docs/stylesheets/extra.css:

:root > * {
  --md-primary-fg-color: #25252d;
  --md-primary-fg-color--light: #25252d;
  --md-primary-fg-color--dark: #25252d;
  --md-accent-fg-color: #25252d;
}

But I'm always ending up with the default blue colour. Am I missing something obvious here?

Image

Related links

N/A

Reproduction

N/A

Steps to reproduce

N/A

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions