RE: Dealing with form elements...

Ick ick ick ick!  Let's not hack a one-off solution to this; why don't
we go with the long-ago proposed arbitrary-attribute mechanism, so you
could do something like:

INPUT[TYPE=SUBMIT] { color: green; text-decoration: none; }
INPUT[TYPE=RESET] { color: red;   text-decoration: none; }
INPUT[TYPE=IMAGE] { vertical-align: blah; text-decoration: none; }
INPUT        { text-decoration: underline; }

obviously, this can go much further:
UL[TYPE=COMPACT] { ... }
or even
A[HREF] { ... }	/* any source anchor */
[HREF] { ... }	/* any element with an HREF */

I'd sign up to support this.

On a side note, though, there is a problem with describing the
difference between the "inside" of an INPUT element and the "outside" -
for example, when you set "vertical-align: super" on a text box, do you
mean the text box should be superscripted, or the content inside the
text box should be?  For this, I would propose that a new pseudoclass,
":inside" be added and applied to INPUT elements only.  Comments?

	-Chris
Chris Wilson
cwilso@microsoft.com
-[-

>-----Original Message-----
>From:	William M. Perry [SMTP:wmperry@aventail.com]
>Sent:	Tuesday, February 04, 1997 8:22 AM
>To:	W3C Style Mailing List
>Subject:	Dealing with form elements...
>
>Was just rooting around in the w3 forms code, and had a flash of insight.
>You cannot really set CSS properties on a form input area very well.  The
>reason is that you do not know what _type_ of input area it is.
>
>You could in the old CSS spec (level 2) that had ways to access attributes
>on elements instead of just class-wise.  I'd propose using some 'input'
>specific pseudo-classes to specify the type of the input area.
>
>The reason I would like this is that Emacs-W3 allows you to do all sorts of
>fun things to input fields.  I would like to specify in the default
>stylesheet:
>
>input:submit { color: green; text-decoration: none; }
>input:reset  { color: red;   text-decoration: none; }
>input:image  { vertical-align: blah; text-decoration: none; }
>input        { text-decoration: underline; }
>
>Without this, you cannot specify that you want everything but submit/reset
>buttons underlined, etc.
>
>-Bill P.
>

Received on Tuesday, 4 February 1997 13:32:48 UTC