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

Re: Dealing with form elements...

From: William M. Perry <wmperry@aventail.com>
Date: Thu, 6 Feb 1997 13:28:33 -0800
Message-Id: <199702062128.NAA24226@newman>
To: Bert Bos <bert@w3.org>
Cc: www-style@w3.org
Bert Bos writes:
>Chris Wilson (PSD) wrote:
>> 
>> 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.
>
>Looks like a good plan (well, it was my own idea, a long time ago:-) )

  the only problem I have with this is case sensitivity.  Attribute names
are no problem - they are case insensitive thanks to SGML.  

<!ENTITY % InputType
        "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
            | RESET | FILE | HIDDEN | IMAGE)">
<!ATTLIST INPUT
        type %InputType TEXT     -- what kind of widget is needed --
        name  CDATA #IMPLIED     -- required for all but submit and reset --
        value CDATA #IMPLIED     -- required for radio and checkboxes --
        checked (checked) #IMPLIED -- for radio buttons and check boxes --
        size CDATA  #IMPLIED     -- specific to each type of field --
        maxlength NUMBER #IMPLIED
        src   %URL  #IMPLIED     -- for fields with background images --
        align  (top|middle|bottom|left|right) top -- image alignment --
        >

  Are we guaranteed that a conforming parser should normalize all TYPE's to
their uppercase equivalents?  Anyone care to comment?

  How will you explain to users that some things like this are normalized,
but the majority are not.

>However, I'd like to be sure that this is really the best syntax. For a
>programmer like Chris Wilson and for myself, this looks pretty natural,
>and it doesn't complicate the implementation a whole lot either. But when
>all these delimiters come together (# : . [ = ]) can we still claim that
>writing style sheets is easy, as the CSS1 Recommendation does now, in the
>very first line?

  See above.

-Bill P.
Received on Thursday, 6 February 1997 16:31:26 GMT

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