Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: customize colors in mkdocs.yml #73

Closed
kcgthb opened this issue Dec 19, 2016 · 5 comments
Closed

RFE: customize colors in mkdocs.yml #73

kcgthb opened this issue Dec 19, 2016 · 5 comments

Comments

@kcgthb
Copy link
Contributor

kcgthb commented Dec 19, 2016

Hi Martin,

First of all, thanks a lot for your awesome work on this theme!

Do you think it would be possible to allow customizing the color palette in mkdocs.yml directly? I'd like to use colors that are not in the Material Design color palette, and currently, my only option is to modify src/assets/stylesheets/_palette.scss to add custom colors, and rebuild the whole theme. Which seems a bit heavy for just changing colors.
Plus, it makes tracking changes and fixes in the theme more difficult, as it requires a rebuild to add those custom colors each time the theme is updated.

Having an option to specify hex codes for primary and accent colors in mkdocs.yml would be a much easier way to customize colors outside of the material palette.

What do you think?

@squidfunk
Copy link
Owner

It's not on the roadmap. We would have to put all rules that use the colors into the main template (or a partial), so it would always be rendered inline. This is an ugly mixture of markup and styles which is already necessary for custom webfonts, but far more rules are necessary for the color and it would worsen maintainability.

The Material theme supports 19 colors. Show me a another mkdocs theme that does that ;-) Also compiling is fairly easy and you can adjust everything by just changing two variables.

@kcgthb
Copy link
Contributor Author

kcgthb commented Dec 20, 2016

Thanks for the explanation. Compiling is indeed not complicated and the theme supports a wide variety of colors already, but sometimes, when integrating the theme in an ecosystem of websites that all need to adhere to the same graphical rules, you need very specific colors that are not in the theme.

But that's perfectly fine, being able to customize the theme is already very convenient.

Thanks!

@squidfunk
Copy link
Owner

I will provide an example which classes to override with extra CSS, rather than compiling the project. Basically all classes are listed in src/assets/stylesheets/application.palette.css, so you just need to copy those and put them in a separate CSS file which needs to be included.

@lgeiger
Copy link
Contributor

lgeiger commented Sep 2, 2019

I will provide an example which classes to override with extra CSS, rather than compiling the project

Do you have a link to this example? I think it would be very helpful for users who want to customize the appearance.

@squidfunk
Copy link
Owner

There are already a lot of examples for a multitude of different use cases in the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants