Gtk.StyleContext.prototype.add_class

function add_class(class_name:String):void {
    // Gjs wrapper for gtk_style_context_add_class()
}

Adds a style class to context, so posterior calls to Gtk.get or any of the gtk_render_*() functions will make use of this new class for styling.

In the CSS file format, a Gtk.Entry defining an "entry" class, would be matched by:

<programlisting> GtkEntry.entry { ... } </programlisting>

While any widget defining an "entry" class would be matched by: <programlisting> .entry { ... } </programlisting>

Since 3.0

class_name

class name to use in styling