How to override stylesheet.css in an extension by a shell theme?

I am using an extension with this stylesheet.css. I want to override some of the items in it by using my shell theme. In ~/.local/share/themes/my-theme/gnome-shell/gnome-shell.css, I wrote some CSS rules with the exact same selectors as the one in the extension’s stylesheet.css. I manage to get some change of properties working by specifying items that are not specified in stylesheet.css, but I cannot override those that are already present in stylesheet.css. I tried adding !important or make the selector more specific, but neither of the methods worked. How to override the extension’s stylesheet.css?

Related: override css in a gnome shell extension with a shell theme - Ask Ubuntu

maybe try

put the css in ~./config/gtk-4.0/ folder, i think it had higher priority than extension theme

or simply copy your theme css and put it on the extension css itself :slight_smile:

The Shell does not use GTK, so putting a file inside the GTK’s configuration directory won’t do you any good.