I assume you read the GtkWidget as GtkBuildable documentation, which tells you that you should use the
style element will add the CSS classes to your widget, in case there are additional classes added programmatically by the widget itself.
If you want to replace all CSS classes, or you know exactly when the widget will add CSS classes programmatically, then you can use the
css-classes property as a newline-separated list of strings:
Personally, I recommend you use the