How to prevent child widgets from inheriting their parent's css

I have a GtkMenuButton that has the .osd style class, however its popover seems to be inheriting this and it makes it very difficult to read.

Is there any way to prevent the popover from inheriting the css or override the css?

i have tried setting the popover’s style to .background and .view; did not work;

Thank you for any help.

image of the problem:

Hi, it seems like you are trying to put an Adwaita spin row inside a popover, which is definitely not something I would recommend doing. :slightly_smiling_face: Rows are not really intended to be used in places like that. A regular spin button / slider with a label instead should solve your problem.

If there is only a limited amount of possible sizes, you could also make it a menu with all the size options visible at once. Have a look at what e.g. Papers is doing for the stroke size option in its annotation mode.

Thanks for the help :^)

And I am very glad you have mentioned papers, as that has given me some better ideas !