RE: Dealing with form elements...

We do something similar to this in our soon to be released word processor Intranet Writer (IW) and its work really fine.
(IW is completly based on CSS1 and HTML.)
Instead of using pseudo classes, we use special selectors like INPUT-TEXT, INPUT-SUBMIT and INPUT-CHECKBOX. 
(We also added a 'background-internal:' property to control the color of the background within the control. )

Best,
---Bjorn

Sample rules we use:

INPUT-TEXT {
	border: beveled;
	background-internal: white;
	margin: 2pt;
	font-family: monospace;
	text-align: left;
}

	
INPUT-SUBMIT {
	border: raised;
	background-internal: gray;
	margin: 2pt;
	text-align: center
}



----------
From: 	William M. Perry
Sent: 	Tuesday, February 04, 1997 5:21 PM
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 11:51:54 UTC