[whatwg] [html5] Rendering of interactive content

Ian Hickson ian at hixie.ch
Sun Apr 26 20:36:39 PDT 2009


On Thu, 12 Feb 2009, Giovanni Campagna wrote:
> 2009/2/11 Ian Hickson <ian at hixie.ch>
> > > > >
> > > > > 2) you depend on css3-ui, in CR stage, instead of becss, a very 
> > > > > early WD
> > > >
> > > > BECSS is actually probably more stable than CSS3 UI at this point.
> > >
> > > Why do you say so? Will CSS3 UI go back to Last Call or BECSS 
> > > process to Last Call in the near future? I'm not sure. In the mean 
> > > time, CSS3 UI is final, and waiting only for implementation.
> >
> > CSS3 UI is very vague, and is going to need serious work before 
> > browsers are able to actually implement it properly. A lot of the 
> > vendor feedback at the time it was written was dismissed (e.g. it 
> > doesn't have a particularly useful or comprehensive list of 
> > appearances).
>
> Well, it is the *Basic* User Interface, that is, the bare minimum. All 
> the rest is Advanced UI, that I hope one day we will have.

It doesn't matter how basic a spec is, it still can't be vague if it is 
to be interoperably implemented.


> > > > > 3) you don't block the binding property: I don't expect that 
> > > > > applying an XBL binding on an element causes it to appear like a 
> > > > > span (because it gets almost no default CSS)
> > > >
> > > > This is actually intentional. Experience with elements like 
> > > > <fieldset> that have styles that aren't expressed in CSS is that 
> > > > you end up not being able to restyle them properly if you desire. 
> > > > With 'binding' we'd be able to knock out the whole default 
> > > > rendering (including weird things with the children) in one go.
> > >
> > > The fact is that binding it the best way to apply a set of event 
> > > handlers to an element. Having to tweak the computed style of a 
> > > fieldset in order to find what properties are actually set and 
> > > reproduce them in the binding, just to put a set of onchange 
> > > handlers to lots of fieldset, does not look optimal.
> >
> > I don't understand why you would need to know what properties are set, 
> > or what 'onchange' has to do with anything here.
> 
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head>
> <xbl xmlns="http://www.w3.org/ns/xbl">
> <binding id="textboxes" >
> <handlers><handler event="onchange">window.alert("Hey! You changed my text
> box!"); </handler></handlers>
> </binding>
> </xbl>
> <style>input[type=text] { binding: url(#textboxes); }</style>
> </head>
> <body><form><input type="text" value="Change me!" /></form></body>
> </html>
> 
> At a first look, it just sets an onchange event handler to every 
> input[type=text].

It would be a weird use of XBL, though.


> Using the HTML5 approach to widgets presentation, you would need to set 
> the appearance to field on the bound element or it will look much like a 
> <span>

Sure. But you'd just have the #textboxes binding inherit from the built in 
one, and all would be fine.


> > We'll probably change that to just use keywords in due course.
>
> So what should be the difference between appearance: field and binding: 
> field ?

'appearance' only sets the appearance.

'binding' sets the behaviour, DOM bindings, appearance, etc.


> > Authors should act as if the default style sheet is something sensible 
> > but they don't know what. (Because that is in fact what the situation 
> > is, once you consider user style sheets.)
> 
> That is, the rule for authors is "not just act as the UA default style 
> sheet was not present, but also act as if it was completely undefined or 
> defined to something weird", so explicitily write it every time it may 
> be dangerous, like for :link.

Yes.


> That's a completely different point of view. Thank you for clarifications,
> I'll write div { display:block; } and :link { color:blue;
> background-color:transparent;} in all my style sheets from now on.

Or, you can just not change the defaults except where you actually want a 
particular look, and leave the styles to be what the user wants where you 
don't mind what they are.

In other words, if you actually want your links to be blue, then set them 
to blue. If you want them to be what the user wants, don't set them at 
all. However, you shouldn't just reset them to the defaults for the sake 
of it.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list