You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Damon Courtney <da...@tclhome.com> on 2004/05/13 18:13:26 UTC

Bastardizing Stylesheets

    For those of you who have never used DIODisplay, this conversation
will be of little interest to you. 0-]  For those of you that do, I
have some thoughts I want to share.

    As some of you may know, we currently have a system which attempts to
bastardize the stylesheets used by DIOD for our own amusement.  I like
several features of this.  Most importantly, stylesheets don't allow
us any way of specifying multiple classes for an item and then letting
the browser pick based on what is available.  This means that we (the
display object) need to parse the CSS file so that we know what
classes are available and then use the appropriate one.  Why CSS
doesn't do this, I don't know.

    The other part of our little toying is a little more... controversial.
 Stylesheets also don't allow us any way of specifying certain
attributes of components that we'd like to.  So, we added some style
options ourselves that we simply parse out and use as we see fit. 
Currently this amounts to only one option, but this is where my
questions come in.  I see two ways of doing this.

1.  Continue to add our own options to stylesheets.  This will, of course,
be completely ignored by the browser, so there's no real danger other than
making non-compliant CSS.

2.  Make another sheet of some kind which defines elements in DIODisplay. 
I really want to get to a point where you can define everything about a
display object from a sheet.  Many options today are not currently
configurable.

    You can't configure the "Submit Request" button to have a different
text.  You can't configure the "Go" button to have an image.  Etc... 
We could, easily, add more options to the object itself (-submittext,
-gotext, etc...), but I don't think this is the way to go.  I think
our own "stylesheet" of some kind is in order.

    This sheet can totally follow the parameters of a standard stylesheet.
 The format is relatively easy to parse.  Or, we can come up with our
own format.  One that's even easier is something that could simply be
read or sourced by Tcl into arrays.

    Once we have this format, we can define anything we like without fear
of screwing up someone else or creating non-compliant CSS.  I,
personally, don't care about marking up CSS, but some people might.  I
really want to be able to configure everything from a sheet.  Which
means I want to add a lot more non-standard options.

    Any ideas?  Thoughts?

D

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org