Giter Site home page Giter Site logo

Comments (9)

mfaux avatar mfaux commented on July 28, 2024 2

FYI, this bug still occurs if the operation does not have operationId declared in the OpenAPI file.

For example, given this operation...

paths:
  /products:
    get:

...Redocusaurus renders this HTML:

image

Since the div is missing an id prefixed with operation, the CSS selector fails to match:
image

p.s. thank you for your work on this project!

from redocusaurus.

ArtFlag avatar ArtFlag commented on July 28, 2024 1

I've open this issue to request some classes to help style the right pane more easily.

from redocusaurus.

MichielDeMey avatar MichielDeMey commented on July 28, 2024 1

@rohit-gohri Done, PR is up: #112

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024

Thanks for reporting this! Probably caused by #60 I think

from redocusaurus.

inacho avatar inacho commented on July 28, 2024

Removing the following styles fixes the issue:

.redocusaurus h2,
.redocusaurus h3,
.redocusaurus h4 {
  color: var(--ifm-font-color-base);
}

@rohit-gohri Do you think it's ok to completely remove those styles?

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024

Probably not, they are required in the main content I think. I think we need to invert the color for the right sidebar as that always has a dark bg.

from redocusaurus.

MichielDeMey avatar MichielDeMey commented on July 28, 2024

Currently in the same boat as @mfaux, we don't have any operationId specified for any API routes.

from redocusaurus.

MichielDeMey avatar MichielDeMey commented on July 28, 2024

Currently fixed the sidebar header colors (without the need for operationIds) using the following CSS override for Redocusaurus v0.5.0.

html:not([data-theme="dark"])
  .redocusaurus
  .redoc-wrap
  .api-content
  > div
  > div:nth-child(1)
  > div:nth-child(2)
  h3 {
  color: var(--ifm-font-color-base-inverse);
}

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on July 28, 2024

Thanks @MichielDeMey! It would be great if you can open a PR with the fix, this is the file with the style overrides: https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-theme-redoc/src/theme/Redoc/styles.css#L29

I would be happy to merge it and cut a release with the fix

from redocusaurus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.