Re: [css-d] Styling form controls

On 8/15/05, Christian Heilmann <codepo8@gmail.com> wrote:
> > Another example is button elements. Every browser except safari screws
> > them up. There is extra faux padding that cannot be removed (except
> > safari), positioning is f'd up, and floats don't work. Go to
> > kodakgallery.com and you can see the buttons are just div with <a>
> > inside using js to submit the form. That was the only way we could
> > make buttons i18n'able and have rounded corners. Javascript should not
> > be required to make a button.
> 
> How about generating <input type img? 

Because you can't use text. It will take time and cost money make
hundreds of such images. Multiply the number of images by about 6
languages and multiply that by the cost of translators who do graphics
work + work after QA testing.

Doesn't button have even browser
> support issues when it comes to submitting a form?  It is not that
> hard to do and I did it on some projects, localised in 18 languages.
> Granted, some of the encoding issues were a PITA.
> 
The button element does not work in ns4 but works in any other
browsers. It's html 4.0.

> Your  solution is even worse as you  made the _form submission_
> dependent on JavaScript. It would be easy to replace a submit button
> with a styled link DOM only for JavaScript users and nobody would be
> the wiser.
> 
There could have been a more accessible way to do it, true. It wasn't
100% my decision -- my input was considered, but we did not do it that
way.


> All of this are browser issues though, not CSS problems and part of
> the OFF-Topic list:
> http://css-discuss.incutio.com/?page=OffTopic
> 
This is about the spec and the careless implementation of css in form
control (and the bugs and confusion it causes).

The CSS spec is vague for form controls. Browser vendors haven't taken
a critical approach regarding form elements and style. They just
implement the vague spec.

Let's look at the spec:
Section 18.4 acknowleges styling of form controls:
http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines
"At times, style sheet authors may want to create outlines around
visual objects such as buttons, active form fields, image maps, etc.,
to make them stand out.
..."

The conformance section flatly contradicts this:
http://www.w3.org/TR/CSS21/conform.html
"CSS2.1 does not define which properties apply to form controls and
frames, or how CSS can be used to style them. User agents may apply
CSS properties to these elements. Authors are recommended to treat
such support as experimental. A future level of CSS may specify this
further."

The spec is contradictory and confusing to browser vendors. Sec 18.4
flatly contradicts the conformance sec.

Browser vendors have implemented the spec in the way they see fit. It
is not a thoughtful implementation. I have proposed a thoughtful
approach.

Mozilla and Opera sort of copy IE in the faux-padding on button and
type='button' elements. Everything else is a crapshoot.

The spec can and and does change, when needed. It is needed in this
case. Here' s the problem addressed with a proposed solution:

https://bugzilla.mozilla.org/show_bug.cgi?id=304548

Please, DO NOT SPAM THE BUG! Please. No developer will take the bug if
it looks like a discussion thread. This only needs approval from guys
like I Hickson, D Baron, B Zbarsky, Asa, or any other big contributors
at Mozilla. D Baron gave support to the idea.

leave discussion for the w3 list. 

Thanks for your input.

Thank you,

Garrett
-- 
http://dhtmlkitchen.com/

Received on Monday, 15 August 2005 21:12:10 UTC