W3C home > Mailing lists > Public > public-houdini@w3.org > June 2015

Re: [css-props-vals] First iteration of L1 spec

From: Liam R. E. Quin <liam@w3.org>
Date: Fri, 12 Jun 2015 23:26:50 -0400
Message-ID: <1434166010.19586.113.camel@w3.org>
To: Florian Rivoal <florian@rivoal.net>
Cc: Greg Whitworth <gwhit@microsoft.com>, "public-houdini@w3.org" <public-houdini@w3.org>
On Fri, 2015-06-12 at 13:48 +0200, Florian Rivoal wrote:

> 5) I don't know if we can express solve the reflow/layout hook well 
without first exposing the box tree / fragment tree.

> Let's say you're trying to use custom properties to polyfill
> hyphenation. You might be tempted to go fiddle with the dom to
> inject the hyphens and line breaks where you want them, but that
> would trigger a style recompilation followed by a reflow, and
> potential infinite loops. Even if you don't, it wouldn't be that
> simple to undo when the property is switched to another value.

It is tricky but tractible. Yes, you need to be able to backtrack, and 
(especially since the javascript programmer is in control) you can end 
up with loops. An API that lets you call the native "lay out children" 
for each child in turn (which in turn may end up calling your 
JavaScript for some of the objects of course) helps programmers get it 
right. A timeout might be a reasonably way to catch problems, falling 
back to built-in layout.

> Or let's say you're trying to polifyll regions. Trying to create new 
fragments by making new DOM elements would get you in the same mess.

Yes. But the tools need to be powerful enough to do what people need, 
and this means they will be powerful enough that people can hurt 
thmselves with them.
Received on Saturday, 13 June 2015 03:26:56 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 13 June 2015 03:26:56 UTC