[css-houdini-drafts] [css-layout-api] LayoutConstraints object - Are we ok with exposing information we don't have compat on?

bfgeek has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-layout-api] LayoutConstraints object - Are we ok with exposing information we don't have compat on? ==
This primarily comes up with orthog. writing modes, e.g.

https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=5867

```html
<style>
#container { width: 200px; height: 100px; background: orange;}
#cross { display: flex; writing-mode: vertical-rl; padding-left: 10%; background: red; }
</style>
<div id=container>
  <div id=inner>
    <div id=cross>TEST</div>
  </div>
</div>
```

If `#cross` was controlled by the layout API (`display: layout(foo)`) it would get:

In chrome/webkit:
```js
constraints.percentageInlineSize === 200;
```

In edge:
```js
constraints.percentageInlineSize === 100;
```

In FF
```js
constraints.percentageInlineSize == Infinity; // ?
```

As a basic example.

**** STOP! DON'T ARGUE ABOUT WHO IS CORRECT HERE AT THE MOMENT ****

Are we fine with giving the layout API different answers for different engines, and working towards compat in parallel?

Do we initially write tests for the LayoutConstraints object we know we have compat on?

Do we scope down the layout API initially in V1 and only accept `LayoutOptions.sizing='block-like` and *only* expose:

```webidl
interface LayoutConstraints {
  readonly attribute double fixedInlineSize;
  readonly attribute double? fixedBlockSize;
}
```

As we strictly don't require knowing the percentage/available sizes when *our* inline/block size are determined by the engine. 

Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/749 using your GitHub account

Received on Saturday, 7 April 2018 20:20:37 UTC