
CSS THEME ENGINE FOR GTK+
=========================

Putting stuff together for a gtk theme engine that would be configured using CSS rather than gtkrc syntax.

Bzr repository at:
  http://bzr-playground.gnome.org/~robsta/gtk-css-engine/
  bzr+ssh://bzr-playground.gnome.org/bzr/robsta/gtk-css-engine

Svn at:
svn+ssh://robsta@svn.gnome.org/svn/gtk-css-engine/branches/gtk-css-engine-bzr
This is updated infrequently from bzr.

Andreas' `Gilouche-CSS' branch is at:
  http://bzr-playground.gnome.org/~andreasn/gtk-css-engine/
  bzr+ssh://bzr-playground.gnome.org/bzr/andreasn/gtk-css-engine


(0) CSS Subset
==============

* Descendant selectors, e.g. "GtkComboBox GtkButton { ... }"

* Child selectors, e.g. "GtkBox > GtkButton { ... }"

* Class selectors, e.g. "hline.handlebox { ... }"
  The class-part is mapped to gtk'd detail string.

* ID selectors, e.g. "GtkButton#foo { ... }"
  The ID-part is mapped to the widget's name.

* Universal selector, e.g. "* { ... }"

* Sequences of selectors, e.g. "GtkNotebook, GtkFrame { ... }"


(0.1) Supported CSS Properties
------------------------------

The following properties are at least partially supported.

background
background-color
background-image
border
border-bottom
border-left
border-right
border-top
color


(1) Primitives
==============

Attributes are canonicalised, i.e. s/_/-/g.
Comments are enclosed in ().
Optionality is expressed through [].
pseudo class "normal" will be default.

* arrow
  Classes: arrow | calendar | menu-scroll-arrow-up | menu-scroll-arrow-down | 
		menuitem | notebook | spinbutton | tearoffmenuitem |
		hscrollbar | vscrollbar
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
    - arrow: up | down | left | right | none

* box
  Classes: buttondefault | button | bar (cellrendererprogress) | 
	   handlebox-bin | hruler | hseparator (in `wide-separators' mode) |
	   menubar | menu | menu-scroll-arrow-up | menu-scroll-arrow-down | 
	   menuitem | hseparator | notebook | optionmenu | 
	   bar (progress-bar) | trough (progress-bar | range) | hscrollbar | 
	   vscrollbar | trough-upper | trough-lower | trough-fill-level-full | 
	   trough-fill-level | spinbutton | spinbutton-up | spinbutton-down | 
	   toolbar | vseparator | vruler | base (window)
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
** boxgap, mapped onto "box".
  Classes: notebook
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
    - position: left | right | top | bottom

* check
  Classes: cellcheck | checkbutton | check (menuitem)
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* diamond
  No predefined classes for this primitive.
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* expander
  Classes: expander | treeview
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - style: collapsed | semi-collapsed | semi-expanded | expanded

* extension
  Classes: tab (notebook)
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
    - position: left | right | top | bottom

* flatbox
  Classes: checkbutton | curve-bg | entry-bg | eventbox | expander | tooltip | 
	   listitem | trough (progress) | checkbutton | text | treeitem | 
	   viewportbin | base (window) |
	   cell-odd[-start | -end | -middle] | 
	   cell-even[-start | -end | -middle] | 
	   cell-odd-ruled-sorted[-start | -end | -middle] | 
	   cell-even-ruled-sorted[-start | -end | -middle] | 
	   cell-odd-ruled[-start | -end | -middle] | 
	   cell-even-ruled[-start | -end | -middle] | 
	   cell-odd-sorted[-start | -end | -middle] | 
	   cell-even-sorted[-start | -end | -middle]
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* focus
  Classes: button | calendar-day | checkbutton | entry | expander | 
	   colorwheel-light | colorwheel-dark | iconview-drop-indicator | 
	   icon-view | add-mode (listitem) | tab | button (gtkoptionmenu) | 
	   trough (gtkrange) | text | textview | tray-icon | treeitem | 
	   treeview-drop-indicator[-left | -right | -middle] | 
	   treeview[-left | -right | -middle]
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.

* handle
  Classes: handlebox | paned
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
    - orientation: horizontal | vertical

* hline
  Classes: handlebox | hseparator | menuitem | tearoffmenuitem | toolbar
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.

* option
  Classes: cellradio | option (menuitem) | radiobutton
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* resizegrip
  Classes: statusbar
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - edge: north-west | north | north-east | west | east | south-west | south | south-east

* shadow
  Classes: calendar | combobox | dnd | entry | frame | handle |
	   scrolled-window | text | viewport
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

** shadowgap, mapped onto "shadow".
  Classes: frame
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out
    - position: left | right | top | bottom

* slider
  Classes: hscale | vscale
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* tab
  Classes: optionmenutab
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* vline
  Classes: handlebox | toolbar | vseparator
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.


(1.1) Unsupported primitives
----------------------------

* polygon
  Pseudo classes: normal | active | prelight | selected | insensitive
  Selectors:
    - Arbitrary widget properties that can be represented as a string.
    - shadow: none | in | out | etched-in | etched-out

* layout
  Styling of text will not be considered for now.

* string: deprecated in Gtk+ proper.


(3) Brainstorming
=================

* Multiple classes per element, can this be emulated somehow?

* CSS Variables ( http://disruptive-innovations.com/zoo/cssvariables/ ). Named colours could be implemented as built-in variables.

