Search code examples
cssfrontenddocumentationredocly

how to set the colour of inner request body colour to my default dark colour in redocly?


I'm using redocly for my api documentation. Currently I'm having an issue when I using the dark mode, the inner schemas of a request body appears in a white background. I want to change it to dark colour.

o

As you can see if I edit the background colour of the class sc-ikkxIA daqcVd then it will fix my issue. Since it is a random generated class i wanted to know how we can solve this issue permanently.


Solution

  • Are the td containing only schemas ? And to what extent the class names are randomly generated ?

    If the td only contains schemas and the class names always start with "sc", you could target the div by doing :

    td div[class^="sc-"] {
       background-color: /* the color you want */
    }
    

    By doing so you will provide the background color for every div that have a td parents and have a class name starting with "sc-".