w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
https://drafts.css-houdini.org/
Other
1.84k stars 141 forks source link

[css-layout-api] Unregistered layout function and blockification. #844

Open emilio opened 5 years ago

emilio commented 5 years ago

As I see the way unregistered layout functions are handled right now is ad-hoc: You always create a Layout API Container, but if the definition is not there you fall back to flow layout in some cases.

But the data in the definition is used for other stuff (i.e., blockification, for example, via childDisplay).

https://drafts.css-houdini.org/css-layout-api/#layout-api-box-tree doesn't define what happens if the definition is missing, and it should. I have no particularly strong opinion on what to do in that case...

I tend to thing that instead of monkey-patching all the handling depending on the registeredness of the layout function and unregistered layout property should maybe just compute to flow-root or block... But I don't have all the context to know why the currently-specified handling is the way it is so I may be missing something.

css-meeting-bot commented 5 years ago

The Houdini Task Force just discussed unregistered layout functions, and agreed to the following:

The full IRC log of that discussion <TabAtkins> Topic: unregistered layout functions
<astearns> github: https://github.com/w3c/css-houdini-drafts/issues/844
<TabAtkins> iank_: When we register a layout function, there is a childDisplay property which tells the rendering engine how to build a box tree
<TabAtkins> iank_: By default it will blockify everything, similar to flex and grid
<TabAtkins> iank_: Other mode doesn't
<TabAtkins> iank_: We haven't specified what happens if you put display:layout(...) but the ... isn't registered yet
<TabAtkins> iank_: I have a slightly pref for blockifying everything, as it's the default
<TabAtkins> iank_: Less change if there's an error in your layout function
<TabAtkins> RESOLVED: An unregistered or error'd layout() value causes blockification of the child elements, like the default value of childDisplay for a registered layout worker.