mkdocs-plugins icon indicating copy to clipboard operation
mkdocs-plugins copied to clipboard

[OpenAPI, Styles] Missing CSS styling for OpenAPI Docs?

Open Jadarma opened this issue 1 year ago • 5 comments

I was trying to set up a demo sample, everything works as intended, except the styling does not seem to match the images in the documentation.

I did download the CSS from Release 1.0.4 (and seems like 1.0.5 doesn't provide it?), and I am sure it is correctly set up because other plugins like cards work.

The main thing I noticed missing is the coloring of the HTTP methods, like how POST is colored blue in the example result. Inspecting the HTML, I see the elements do have a http-post class and everything, but there is no mention of it anywhere in the CSS file. I then looked at the source files in this repo, and there is no file for the OpenAPI docs, only the other plugins.

Is the CSS for this plugin available somewhere separately, or am I missing something? Thank you!

For reference, my mkdocs.yml:

site_name: My Docs
theme:
  name: material

plugins:
  - search
  - neoteroi.mkdocsoad:
      use_pymdownx: true

markdown_extensions:
  - pymdownx.details
  - pymdownx.superfences
  - pymdownx.tabbed:
      alternate_style: true
  - neoteroi.cards

extra_css:
  - css/mkdocsoad.css

And a screenshot: image

Jadarma avatar Feb 29 '24 11:02 Jadarma

Agreed with this...I can't find a CSS file that references any of the classes I see in the Dev Console for elements in the OAD guy, and I don't even seem to be able to get the right side nav for the API methods working (if that's a CSS problem). Looked through the recent builds outputs as well, nothing there either that I can see.

awaldow avatar Apr 09 '24 20:04 awaldow

I went through all the releases, and it seems like 0.0.5 was the last release to have any OAD CSS in it of note. The next release also happens to be the one where CSS -> SASS so maybe something was missed?

awaldow avatar Apr 09 '24 23:04 awaldow

Hi @Jadarma and @awaldow Thank you for reporting this issue and the insight. I take a look this weekend.

RobertoPrevato avatar Apr 13 '24 08:04 RobertoPrevato

Any updates @RobertoPrevato? I am encountering the same issue.

xontab avatar Jun 11 '24 07:06 xontab

I have the same problem! Any updates? Thanks

jsantist3ban avatar Jul 05 '24 12:07 jsantist3ban

Hi!

Are there any updates on this issue?

hanubence avatar Aug 26 '24 10:08 hanubence

Hello there!

Are there any updates about this problem?

patrickpiccini avatar Aug 29 '24 22:08 patrickpiccini

Sorry for taking forever to work on this. You can download the contents of this file:

https://github.com/Neoteroi/mkdocs-plugins/blob/main/styles/oad.scss

and put it into CSS. Please note it will work only for OAD HTML generate using the pymdownx plugin, like documented here: https://www.neoteroi.dev/mkdocs-plugins/web/oad/

The final effect looks like in the screenshots of the documentation.

image

RobertoPrevato avatar Sep 04 '24 16:09 RobertoPrevato