Skip to content
  • Christian Hergert's avatar
    listbox: add support for :first-child, :last-child and others · aa07c407
    Christian Hergert authored
    This applies the proper CSS child ordering semantics using GtkCssNode to
    GtkListBox. You can now use :first-child, :last-child, :nth-child(), and
    :last-nth-child() selectors.
    
    For example, this allows styling row separators using CSS while ignoring
    the separator on the last row.
    
     GtkListBoxRow {
       border-bottom: 1px solid @borders;
     }
     GtkListBoxRow:last-child {
       border-bottom: none;
     }
    
    When the sort ordering of the listbox changes, we also update the CSS
    node ordering.
    aa07c407