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] Intrinsic sizes and orthogonal children behaviour #776

Open bfgeek opened 6 years ago

bfgeek commented 6 years ago
<div style="display: layout(foo);">
  <div id=verticalrl >
    Some content, but it really doesn't matter.... 
  </div>
</div>
registerLayout('foo', class {
  intrinsicSizes(children) {
    const sizes = children[0].intrinsicSizes();
  }
});

What is the value of sizes above?

css-meeting-bot commented 6 years ago

The Working Group just discussed Intrinsic sizes and orthogonal children behaviour, and agreed to the following:

The full IRC log of that discussion <fantasai> Topic: Intrinsic sizes and orthogonal children behaviour
<fantasai> github: https://github.com/w3c/css-houdini-drafts/issues/776
<fantasai> iank_: I can say what I expect
<fantasai> iank_: I expect that Sizes is the intrinsic size contribution of that chid in the parent's writing mode
<fantasai> iank_: Different engines will calculate it differently
<fantasai> Rossen: That sounds every vague
<fantasai> s/vague/overly vague for it to be any kind of definition in the spec/
<heycam> fantasai: you're trying to say that the result of that should be the same thing that the layout engine uses for intrinsic size calculation
<heycam> ... whether it's shrink to fit on [various things], intrinsic size keywords, ...
<heycam> ... they should all return the same thing, which is the thing returned here, and just be clear about which axis we're grabbing from
<heycam> ... I think we can put that in the spec, and is definite enough to not be vague
<heycam> ... it's exactly what we're doing in the sizing spec in a number of cases, we don't define how to calculate the intrinsic size, but we require it's consistent across all the places we use it
<heycam> Rossen: I agree
<heycam> RESOLVED: Intrinsic size in orthogonal flows are taken according to the writing mode of the containing block, and that intrinsic size calculations have to be consistent with all other places in CSS (per CSS Sizing).