You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way to do this would be to add extra CSS as you described, I am not aware of any good examples. Otherwise we need to figure out a more general solution for this. See #607
While the theme customizations discussed in #607 may help, they are targeted at modifying the HTML output by MkDocs. This request appears to be about modifying the CSS. As this point, a user could copy the existing CSS file and then make the changes to fit their design/color scheme. I expect that if they put the CSS file in the custom theme dir and give it the same name, it will replace the built-in file.
However, that it not very efficient. Just to change a couple colors will require replacing the same color in multiple locations throughout the CSS file. Of course, this is a solved problem with CSS pre-processors like {less} or Sass. I was recently playing the Reveal.js (a Markdown/HTML slideshow framework) and I thought they has a nice solution for quickly and easily creating your own theme just by overriding a few Sass variables.
To be clear, I have not used {less} or Sass (or the various other pre-processors out there) except to dabble when working with a third party project that has chosen to use them. I have no formal opinion on which is better or if such a thing is really a good idea. I was just pleasantly surprised by how easy it was to consistently alter a couple colors to create my own variation on an existing theme. I would love to be able to replace the MkDocs blue just as easily.
Note that both projects have Python ports of their compilers ({less} & Sass), so it should be easy enough to incorporate into MkDocs build process.
Activity
d0ugal commentedon Nov 20, 2015
The only way to do this would be to add extra CSS as you described, I am not aware of any good examples. Otherwise we need to figure out a more general solution for this. See #607
waylan commentedon Nov 20, 2015
While the theme customizations discussed in #607 may help, they are targeted at modifying the HTML output by MkDocs. This request appears to be about modifying the CSS. As this point, a user could copy the existing CSS file and then make the changes to fit their design/color scheme. I expect that if they put the CSS file in the custom theme dir and give it the same name, it will replace the built-in file.
However, that it not very efficient. Just to change a couple colors will require replacing the same color in multiple locations throughout the CSS file. Of course, this is a solved problem with CSS pre-processors like {less} or Sass. I was recently playing the Reveal.js (a Markdown/HTML slideshow framework) and I thought they has a nice solution for quickly and easily creating your own theme just by overriding a few Sass variables.
To be clear, I have not used {less} or Sass (or the various other pre-processors out there) except to dabble when working with a third party project that has chosen to use them. I have no formal opinion on which is better or if such a thing is really a good idea. I was just pleasantly surprised by how easy it was to consistently alter a couple colors to create my own variation on an existing theme. I would love to be able to replace the MkDocs blue just as easily.
Note that both projects have Python ports of their compilers ({less} & Sass), so it should be easy enough to incorporate into MkDocs build process.
d0ugal commentedon Nov 20, 2015
It is actually very easy to add to CSS and overwrite small sections, we actually do this in the MkDocs documentation. The CSS is automatically added below the theme in the HTML and this can overwrite any section. https://github.com/mkdocs/mkdocs/blob/master/docs/css/extra.css
jeffpeiyt commentedon Nov 20, 2015
thanks for the suggestion. ! Actually I just found this one that looks great: https://github.com/chrissimpkins/cinder and added support for >2 level nav.
chrissimpkins/cinder#2
Maybe we could add this template to the mkdocs default templates as a great option
chrissimpkins commentedon Nov 23, 2015
PR by @jeffpeiyt was merged into the Cinder theme.