question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

My sites `--md-primary-fg-color` get overridden

See original GitHub issue

Contribution guidelines

I’ve found a bug and checked that …

  • … the problem doesn’t occur with the mkdocs or readthedocs themes
  • … the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • … the documentation does not mention anything about my problem
  • … there are no open or closed issues that are related to my problem

Description

I have extra_css that defines the primary colors, like so:

:root {
    --md-primary-fg-color: rgb(219, 149, 80);
    --md-accent-fg-color: rgb(144, 180, 254);
}

This has always worked. But with version 8.5.9 some other colors are used instead. I see this in the inspector:

[data-md-color-primary=indigo] {
    --md-primary-fg-color: #4051b5;
    --md-primary-fg-color--light: #5d6cc0;
    --md-primary-fg-color--dark: #303fa1;
    --md-primary-bg-color: #fff;
    --md-primary-bg-color--light: hsla(0,0%,100%,.7);
}

Expected behaviour

I expect my extra_css colors to be used.

Actual behaviour

Some other colors are used.

Steps to reproduce

Use this extra_css:

:root {
    --md-primary-fg-color: rgb(219, 149, 80);
    --md-accent-fg-color: rgb(144, 180, 254);
}

With 8.5.8 the colors are used, with 8.5.9 they are not

Package versions

  • Python: 3.9.7
  • MkDocs: 1.4.1
  • Material: 8.5.9

Configuration

I haven't minimized this.

System information

  • Operating system: All
  • Browser: All

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
squidfunkcommented, Nov 11, 2022

Released as part of 8.5.10.

2reactions
PEZcommented, Nov 10, 2022

Thanks for looking at this so quickly! 🙏

Yes, the suggested change works. 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage media rules and overrides - Google Web Designer Help
Media rules let you override the default styles and other attributes for different viewport sizes. A media rule applies to either a specific...
Read more >
Find places where a method has been overridden in Android ...
In Android studio and Intellij IDEA, there is a blue icon with a down arrow just at the left of the method defination(only...
Read more >
Microsoft Login Overriding Gmail Login for Virtual Classes
Virtual Learning is stressful enough without logins being overridden so you can't access the sites your children need. This thread is locked.
Read more >
Override master page items - Adobe InDesign
All the master page items on the selected pages have been overridden. Click the elements to select and delete, move, or modify them....
Read more >
Chrome Extensions: Overriding Chrome pages
How to override the Chrome bookmark manager, history, and new tab pages from your Chrome Extension.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found