Re: Theming API hackfest: last call

On Tue, Oct 14, 2008 at 11:44 PM, Behdad Esfahbod <behdad behdad org> wrote:


> Shouldn't the class-specific ones use the css class modifier?  That is,
> ".GtkButton"?

The intersection of terminologies is a bit confusing, but it's really
"div", "p", "span" etc. in HTML and "GtkWindow",  "GtkButton" etc. in
GTK+ etc. that respectively constitute a document. So the use of a
leading period would be wrong. To avoid confusion those elements are
called `types' in libccss. A `class' in CSS is a subset of a
document's elements, not necessarily of homogeneous type.

Initially, when the CSS engine primarily did drawing-routine-theming
("primitive theming") I decided to map the detail string to the CSS
class selector, which made it possible to use "box.button { ... }" to
theme a GtkButton. Now that I'm working towards better support for
widget theming and support for sub-controls [1] like scrollbar arrows,
combobox buttons ..., the class selectors may become available for a
different use:

Per libccss default, the style of a type "Foo" is also applied to all
its derived types (contrast gtkrc, which afaik requires explicit
markup "<Foo>" for that). QT is using the class selector to apply
styling that would not be inherited [2], e.g. ".GtkButton { ... }"
would not affect GtkToggleButton instances and other GtkButton-derived
types. I am pondering this for the CSS engine as well.


- Rob

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]