W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [cssom] Element size/positioning information

From: Gérard Talbot <www-style@gtalbot.org>
Date: Mon, 11 Apr 2011 21:12:48 -0700
Message-ID: <beea8dadc995cfc904302da6cb3a95d1.squirrel@cp3.shieldhost.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style list" <www-style@w3.org>

Le Lun 11 avril 2011 14:35, Tab Atkins Jr. a écrit :
> The current OM APIs for determining the size and position of an
> element are verbose and confusing.


Search for demos, interactive examples, diagrams, schemas. They exist. Try
Peter-Paul Koch, Garrett Smith (DHTML kitchen).

> There's been discussion on how to
> make this better, but it's been scattered and hasn't yet produced
> anything.

Best is to create your own, improve it, make it more versatile, complete,
etc. I know how I would improve my demos right now, make them more clear,
more coherent, more useful.

> Chrome is interested in doing some experimental
> implementation in this space, but there's a lot of possible ways to do
> it, so I'd like to collect and restart the various discussions here. (...)

I think Google should not add more experimentation at this time; just
implement CSSOM as it is would be immensely great, useful, relevant. Other
browsers have bugs (Opera 11, IE8), regressions (IE8; don't know about
IE9) or incomplete implementation (Firefox 4, Konqueror 4.6+).

> Libraries like jQuery offer some simple, relatively-well-named
> functions for querying various sizes that you might want.  jQuery
> gives you .width() for the content box, .innerWidth() for the padding
> box, and .outerWidth() for the border box.

I am totally against use of jQuery (and dojo, MooTools, etc) nonsensical,
monstruous, indecipherable js libraries.

What Google, MDC, MSDN, Opera, Webkit, Konqueror ought to do is create (or
improve with better examples, schemas, interactive demos) useful
documentation, reliable documentation on all these CSSOM properties,
attributes and methods. *_That_* has not been done. *_That_* is the nr 1
problem to fix to begin with.

You say

> The current OM APIs for determining the size and position of an
> element are verbose and confusing.


> It's completely unobvious what each of these do

, then Google should start documentating these, illustrate these,
demo-interactively these (many years ago, MSDN was doing that!) and I
strongly recommend not to add anything experimental at this point.

CSS 2.1 Test suite RC6, March 23rd 2011

Contributions to CSS 2.1 test suite

Web authors' contributions to CSS 2.1 test suite
Received on Tuesday, 12 April 2011 04:13:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC