W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2017

Re: [csswg-drafts] [css-align] Should 'left' and 'right' really both fall back to 'start?

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Tue, 27 Jun 2017 21:27:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-311491003-1498598842-sysbot+gh@w3.org>
Okay, so, we definitely have a better answer for some of these: we can use either the physical directions or the line-relative directions in order to get an answer that is perfectly reasonable and non-arbitrary in the majority of cases. We should fix the spec to do that (to use the physical mappings where they exist). However, there still remain some cases that can't be solved with either mapping.

The table below summarizes all the cases. `L` represents line-relative mapping, `P` represents physical mapping. `?` represents cases that can't be mapped with either.

<table>
  <thead>
    <tr><th>	<th>`align-self`	<th>`justify-self`	<th>`align-content`	<th>`justify-content`
  <tbody>
    <tr><th>Horizontal Parent<br>Horizontal Self	<td>↕ ??	<td>↔ P=L	<td>↕ ??	<td>↔ P=L
    <tr><th>Horizontal Parent<br>Vertical Self	<td>↕ ?	<td>↔ P=L	<td>↔ P	<td>↕ L
    <tr><th>Vertical Parent<br>Horizontal Self	<td>↔ P	<td>↕ L	<td>↕ ?	<td>↔ P
    <tr><th>Vertical Parent<br>Vertical Self	<td>↔ P	<td>↕ L	<td>↔ P	<td>↕ L
</table>

The remaining cases are:
  * `align-self` and `align-content` in a 100% horizontal writing mode environment. There is no non-arbitrary answer for mapping left/right along the vertical axis here. (`??` in the table below)
  * `align-self` in the case of a horizontal parent and vertical self. `align-self` maps against the parent’s writing mode normally, but we could map against the self in this case to get an answer.
  * `align-content` in the case of a vertical parent and horizontal self. `align-content` maps against the self writing mode normally, but we could map against the self in this case to get an answer.
That said, I'm currently of the opinion that we should treat the second two cases according to the logic of the first, though, to avoid crossing contexts.

So we can reduce the number of cases affected, but horizontal writing modes will still need an arbitrary mapping for `left` and `right` in the vertical axis.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1403#issuecomment-311491003 using your GitHub account
Received on Tuesday, 27 June 2017 21:27:30 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:34 UTC