json-viewer
json-viewer copied to clipboard
Feature Request: CSS variable for padding
I would like to request a CSS variable be added for padding to the wrapping shadow DOM element (ul tag), so one can add a little space to the content, especially when it's long and needs to scroll. Thanks!
Hi @Canuckaholic, have you already tried styling the custom element?
json-viewer {
padding: 1rem;
}
Let me know whether this is sufficient, otherwise we could think to add a part
attribute to make it possible to apply custom styles to the UL tag.
Hi @alenaksu ... yes I tried styling the web component itself, but I wasn't able to get the bottom padding that I was looking for, which is why I think I need to be able to add padding to the shadow DOM element.
hi @Canuckaholic, I published a new version of the package that includes new CSS parts that can be used to customize further the component. Please take a look at the readme, I'm curious to know what you think.
https://github.com/alenaksu/json-viewer#css-parts