Re: [cssom] Element size/positioning information

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.

Tab,

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.

and

> 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.

Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Tuesday, 12 April 2011 04:13:20 UTC