JSONSchemaViewer colors palette override #325
-
Hi there! thanks for this wonderful plugin :) Any hint on how to customize the colors used by the JSONSchemaViewer React component and override the ones given by docusaurus? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @manuelscurti, thanks ;) Good question. I didn't tried this yet - would be curious about it.
The plugin uses at least the following things from Docusaurus color palette :
Maybe start with the Global styles approach - the documentation website has a custom.css you can play with it . I have a Netlify set up as it is quite convenient to see visual changes in MR |
Beta Was this translation helpful? Give feedback.
@manuelscurti Thanks for the clarification, I thought it wasn't the case yet.
I will publish the 1.12.0 version where you can put whatever
className
(by default, it will bejson-schema-viewer
).With CSS Specificity, you can override the colors to your liking. I guess something like this could work :
For the way to add it to your website, either include the css file (with
customCss
) or using a wrapper class could do the job.Of course, I would appreciate an real world example that I can put in 🛠️ Customizations showcases
- would be handy f…