leva icon indicating copy to clipboard operation
leva copied to clipboard

API Request: Static CSS Selector for style overrides

Open peterjcaulfield opened this issue 3 years ago • 2 comments

It would be good to assign a static css selector so that consumers can apply css overrides to the leva pane.

Right now the only css classes are generated classes which makes it impossible to override certain styles.

My use case is to adjust to initial position of a global pane.

peterjcaulfield avatar Mar 02 '21 22:03 peterjcaulfield

Leva uses the styling library stitches. You can easily adjust the theme variables through the theme prop. Have a look at this sandbox:

https://codesandbox.io/s/leva-theme-9v0ko

Regarding the initial position, it's not customizable yet but I'll work on something.

dbismut avatar Mar 03 '21 00:03 dbismut

Yep I noticed that but in some cases every style declaration wont be part of the theme (or you may want a localised override) so in these cases an "escape hatch" is needed.

I think the general approach is good though 👌🏼

peterjcaulfield avatar Mar 03 '21 00:03 peterjcaulfield