[csswg-drafts] [css-align] how to position a baseline-sharing group containing items with different fallback alignment (#3454)

MatsPalmgren has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-align] how to position a baseline-sharing group containing items with different fallback alignment ==
The spec text on how to position a baseline-sharing group seems confusing to me.  I'll illustrate with an example:
```html
<div style="display: grid; grid: 50px 50px / 200px;">
  <div style="writing-mode: vertical-lr; justify-self: baseline;">1<br>2</div>
  <div style="writing-mode: vertical-rl; justify-self: last baseline;">1<br>2</div>
</div>
```

[§9.2](https://drafts.csswg.org/css-align-3/#baseline-terms) says (in the last bullet) that "_opposite block flow direction and opposite baseline alignment preference_" share the same baseline group, so the two items above are in the same group.

[§9.3](https://drafts.csswg.org/css-align-3/#align-by-baseline) says "_Position the aligned baseline-sharing group within the alignment container according to the fallback alignment associated with the specified [baseline alignment preference](https://drafts.csswg.org/css-align-3/#baseline-alignment-preference)._".
The problem is that "baseline alignment preference" is associated with an item, not a group. In this case the two items have different fallback alignment, so the spec isn't clear how the group should be aligned.

It seems like the spec text in §9.3 assumes that all items in a group have the same specified alignment value, and thus the same fallback value.

I'm guessing that since the relevant baselines are on the same side visavi the container that the group should use `start` alignment in this case, but the spec could be clearer on this.

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

Received on Tuesday, 18 December 2018 17:52:59 UTC