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

Add level highlight left border / custom css #10

Open
fernandascovino opened this issue Nov 8, 2020 · 1 comment
Open

Add level highlight left border / custom css #10

fernandascovino opened this issue Nov 8, 2020 · 1 comment
Labels
enhancement New feature or request rendering

Comments

@fernandascovino
Copy link

Hey! Thanks for the develop of mkdocs-click, it'll save me a lot of time on documentation 💚

One thing that I would like to suggest is to have a left border on commands description to better organize the docs. I use mkdocstrings for Python documentation that has div structure inside, and it can be easily personalised with a custom.css file (example on the image bellow).

It would be great to do the same here! :)

image

@florimondmanca florimondmanca added enhancement New feature or request rendering labels Dec 9, 2020
@florimondmanca
Copy link
Contributor

Hey! Thanks for the develop of mkdocs-click, it'll save me a lot of time on documentation 💚

You're welcome! This was an initial stab at it that fit our own minimal requirements, so happy to discuss any possible enhancements. :-)

If I understand correctly, this is about wrapping sections that contain "Usage" and "Parameters" around a <div>, setting a mkdocs-click specific CSS class there, so that users are able to target that class in a custom CSS file to customize the styling? That sounds pretty sensible.

Right now the only thing that's blocking that is that mkdocs-click is implemented as a Markdown Preprocessor, which means it transforms Markdown lines into Markdown lines, and that result is fed into the HTML renderer further down the line.

So before implementing this, a pre-requisite might be to switch over to BlockProcessor, which works at the HTML element tree level directly. There's a good example of that style in mkautodoc: https://github.com/tomchristie/mkautodoc/blob/master/mkautodoc/extension.py

Not sure if/when we'll get around to that, but that's my analysis for now. Anyone who comes across this is of course very much welcome to take this off if that's something they're interested in. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rendering
Projects
None yet
Development

No branches or pull requests

2 participants