[whatwg] [html5] Rendering of interactive content
Giovanni Campagna
scampa.giovanni at gmail.com
Sun Feb 8 05:18:27 PST 2009
2009/2/8 Benjamin Hawkes-Lewis <bhawkeslewis at googlemail.com>
> On 7/2/09 20:07, Giovanni Campagna wrote:
>
>> Yes, but what properties should I query for?
>>
>
> In order to find out what, precisely?
>
What to reset, for example (see the first Ian email on this topic)
>
> Binding, behaviour, appearance, border, color, font, all in once? And
>> what should their values be?
>>
>
> Their values depend on user agent defaults (which may be anything), user
> preferences (which may be anything), user stylesheets (which may be
> anything), and publisher styles (which may be anything), as per the CSS
> cascade:
I am the author, so at least those values are known. For what concern user
stylesheets, I should try to override them, it is the user that wants them.
So the only properties I may find useful to know the values are UA default,
that should be consistent across different platform and browser.
>
> http://www.w3.org/TR/CSS21/cascade.html#cascade
>
> In other words, the values cannot be known for sure until you query them.
>
> Even if you mandated precise user agent defaults, the values still could
> not be known for sure until you queried them, because of user preferences,
> user stylesheets, and publisher styles.
>
If you mandate strict UA default, and the publisher (I repeat, I am the
author, I know what I write) overrides them, he may be sure that: either it
will look as no default style applied at all, or any additional property
that applies has been set by the user (so it is not my problem, he wanted
all the <a>s to be purple on yellow background, even if it looks horrible to
me)
>
> If <input type="submit"> in some UA is rendered with all properties set
>> to initial, not only it does not express the semantic of a button, but
>> it may be difficult for a user to actually recognize it as a button and
>> eventually click it.
>> In that case I, as the author, may need to manually
>> set { appearance:push-button; content:attr(value,string,"Send"); } in
>> order to have my form submitted.
>> Try this example (in Firefox or Safari):
>> data:text/html,<style>label { position:fixed; top:-1em; border:1px solid
>> black; } label input { -moz-appearance:none; -webkit-appearance:none;
>> border:none; width:auto; } input[type=submit] { -moz-appearance:none;
>> -webkit-appearance:none; background-color:transparent; border:none;
>> }</style><form action="http://www.google.com/search"
>> method="get"><label>Search: <input type="text" value=""
>> name="q"></label><input type=submit value="Go">
>>
>> Imagine that was the UA default stylesheet instead of an author
>> stylesheet and you may see what interoperability means with web
>> application look and feel.
>>
>
> There's a recursion problem there.
>
> User agents may derive the effects of "appearance" from user-agent default
> stylesheets:
>
> http://www.w3.org/TR/css3-ui/#appearance
>
UA must derive the appearance effects from the user agent skin, widgets
theme or native platform widgets (ie the common controls on win or the Gtk /
Qt themes in Linux). Those settings are not part of the UA default style
sheet, are not necessarily expressed in CSS, and do not take part in the
cascade.
>
> If the user agent default stylesheet does not style push buttons
> differently from other content, and the user agent derives the effects of
> appearance from that stylesheet, then checking or setting the value of
> appearance would not guarantee that your submit button would appear
> button-like.
>
> HTML5 should not mandate the UA present <a>s in blue, but it should
>> mandate the UA present <a>s like links (appearance:hyperlink).
>>
>
> How would you test whether a UA complied with that requirement or not?
> Purely by testing the value of the appearance property applied to the
> element with a default configuration?
1) you test the conformance to HTML5 by testing the value of appearance and
the semantics of the element (it must be an hyper-link, if you want
normative rendering or not)
2) you test the conformance to CSS3 UI by testing the look and feel of the
elements, and comparing it to the standard look and feel for that platform,
skin, them, etc.
>
>
> Obviously this does not relate in any way with user preferences, here we
>> talk about UA defaults.
>>
>
> What if a developer wants to create a UA reflecting a target market's
> differing preferences for presentation, rather than require the users to
> configure it first?
>
> Are you proposing such a UA should be non-conforming?
Could you propose an example of this UA, that still preserves the semantics
of the elements, as required by HTML5?
>
>
> --
> Benjamin Hawkes-Lewis
>
Giovanni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090208/3a0d7eae/attachment-0001.htm>
More information about the whatwg
mailing list