W3C home > Mailing lists > Public > www-style@w3.org > February 1997

RE: Dealing with form elements...

From: Bjorn E. Backlund <bjorn@cooper.xanthus.se>
Date: Tue, 4 Feb 1997 15:54:33 -0100
Message-Id: <97Feb4.175622gmt-0100.28678-1@mimer.upnet.se>
To: W3C Style Mailing List <www-style@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:49 GMT