Re: native elements versus scripted

On Tue, Apr 6, 2010 at 7:09 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> The key to allowing flexible styling of controls with multiple moving parts,
> or "compound" controls, is defining pseudo-elements for the independent
> pieces of the control. In addition, controls with distinct states also need
> pseudo-classes.
>
> For <progress>, the way we would likely approach it is to have a
> pseudo-class for the indeterminate state, and a psuedo-element for the
> currently filled portion. Our <progress> implementation is still a work in
> progress, so it doesn't allow quite that level of flexible styling yet.

For what it's worth, this is the approach I have envisioned too. If
the CSS WG doesn't step up to define these pseudo elements and pseudo
classes we at mozilla would use -moz- prefixed ones for now.

> The CSS WG has traditionally shied away from specifying how CSS properties
> apply to form controls. I think it may be time to revisit that decision.
> Custom styling of form controls is an important feature, and we will deliver
> a real benefit to authors if it works in a consistent way across browsers.

Would love to see this happen. I suspect once browsers have
experimented with this a bit it shouldn't be too controversial how
exactly this should be done. I know work has already started to define
this for the @placeholder attribute introduced by HTML5 and already
implemented by webkit and gecko.

/ Jonas

Received on Wednesday, 7 April 2010 02:56:41 UTC