After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763538 - Wrong CSS selector used with gtk-3.20?
Wrong CSS selector used with gtk-3.20?
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Reported: 2016-03-12 15:28 UTC by Egmont Koblinger
Modified: 2016-03-13 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---

Inspector screenshot for CSS nodes (46.78 KB, image/png)
2016-03-13 07:58 UTC, Egmont Koblinger

Description Egmont Koblinger 2016-03-12 15:28:28 UTC
Gtk+-3.19.11 (on Xenial beta; Gtk+ and Wayland client packages updated from Ubuntu Gnome3 Staging).

The 1px padding, set internally in gtk_css_provider_load_from_data() is not set. The terminal contents are aligned to the very top left.

Similarly, the extra padding is not pink with the patch from bug 763007 comment 9.

Also, placing in ~/.config/gtk-3.0/gtk.css a similar entry:

  VteTerminal, vte-terminal {
      padding: 5px;
      -GtkWidget-cursor-aspect-ratio: 0.15;

makes no effect either.

Changing the selector from "VteTerminal, vte-terminal" to "*" (either in, or in my gtk.css) makes the padding, pink background, whatever applied correctly (well, from gtk.css it's applied to all other widgets as well, but the point is that it's applied to vte too).

No clue if the "VteTerminal, vte-terminal" selector does not apply to the vte widget, or if the theme provides a more specific selector which overrides it.
Comment 1 Egmont Koblinger 2016-03-13 07:58:44 UTC
Created attachment 323779 [details]
Inspector screenshot for CSS nodes

Seems like the VTE widget bears the CSS name "widget" instead of "vte-terminal".

Accordingly, a CSS like

  widget {
    padding: 5px;

does apply to VTE.

The relevant code is this:

  #if GTK_CHECK_VERSION(3, 19, 5)
    gtk_widget_class_set_css_name(widget_class, VTE_TERMINAL_CSS_NAME);


PEBKAC. One cannot compile against 3.18 and then upgrade the runtime libs to 3.19. It needs to be compiled against 3.19.

I still don't get why the VteTerminal selector doesn't work, though – any insight here?
Comment 2 Christian Persch 2016-03-13 10:10:25 UTC
This is probably part of the gtk css changes, I've seen other projects change away from using the gobject type names in css.
Comment 3 Egmont Koblinger 2016-03-13 10:28:24 UTC
Nothing to see here, then.