title: How to style GTK+ with custom CSS?
body: <p>can someone type up a simple example for styling a GTK+ widget with css? I could not figure out how to do it looking at the docs:</p>
  
  <pre><code>#include &lt;gtk/gtk.h&gt;
  int main(int argc,char *argv[])
  {
      gtk_init(&amp;argc,&amp;argv);
      GtkWidget *window;
      GtkWidget *button;
      GtkCssProvider *cssProvider;
  
      gtk_css_provider_load_from_path(cssProvider,"./gtkExample2.css",NULL);
  
      window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
      button = gtk_button_new_with_label("GTK Button");
  
      gtk_style_context_add_provider(gtk_widget_get_style_context(window),cssProvider,GTK_STYLE_PROVIDER_PRIORITY_USER);
  
      g_signal_connect_swapped(window,"delete-event",G_CALLBACK(gtk_widget_destroy),window);
  
      gtk_container_set_border_width(GTK_CONTAINER(window),20);
      gtk_container_add(GTK_CONTAINER(window),button);
  
      gtk_widget_show(window);
      gtk_widget_show(button);
  
      gtk_main();
      return 1;
  }
  </code></pre>