On Wed, 14 Jul 2010, Greg Brown wrote:
One of the nice things about CSS is its support for other kinds of
selectors like type selectors, class selectors, id selectors,
descendant selectors, etc.
True, and those features are essential when you are trying to construct
a complex GUI using HTML, because HTML isn't really a GUI toolkit.
However, Pivot is a GUI toolkit, so you don't need to build so much by
hand.
Hmmm... can't say I follow your argument against selectors
here---especially about the "you don't need to build so much by hand."
I like being able to specify default style values by Java class name.
For example, if you look at BoxPaneSkin you can see that the spacing is
set to 4 by default. Not everyone will like that. Is there a simple way
to change default style values?
Then there's inheritence and cascading, which I haven't touched yet.
Again, these features are useful when styling document markup, but are
not quite as critical in Pivot.
I don't see an impedance mismatch between CSS and WTKX (or BXML as it
is in pivot 2).
You demonstrated one in your example:
http://mail-archives.apache.org/mod_mbox/pivot-dev/201007.mbox/%3c20100709101044.l62...@p3c0.erirefr.arg%3e
TextInput doesn't have "font-size" or "font-weight" style properties -
it only defines "font". Your CSS handling classes need to somehow
translate between the CSS standard styles and the styles that
TerraTextInputSkin supports. This introduces another layer that needs to
be maintained and isn't necessary with the current approach.
We're arguing semantics. We have different ideas about what an
impededance mismatch is in this case. No worries.
Incidentally, given that these properties are part of the CSS spec and the
CSS spec doesn't change very often I don't see a big maintenance headache
in supporting the font-size and font-weight properties.
If, as I have suggested, you were to simply try to support CSS syntax
rather than the actual CSS properties, this would not be a problem.