You didn't explain anything wrong with GTK. You just brought up Electron out of nowhere.
> CSS classes
To spell it out, I think it is all excessive.
https://docs.gtk.org/gtk3/css-overview.html
It even has a DOM inspector window:
https://askubuntu.com/questions/597259/how-do-i-open-gtk-ins...