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

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