-
Notifications
You must be signed in to change notification settings - Fork 142
Description
This primarily comes up with orthog. writing modes, e.g.
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=5867
<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:
constraints.percentageInlineSize === 200;
In edge:
constraints.percentageInlineSize === 100;
In FF
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:
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.