[csswg-drafts] [css-align-3] Abspos alignment in vertical axis should care about align-self, just like horizontal/justify-self (#4983)

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

== [css-align-3] Abspos alignment in vertical axis should care about align-self, just like horizontal/justify-self ==
When an abspos element has `left:auto` and `right:auto`, the sizing/positioning defined in CSS2 is partially dependent on 'direction'. In Align, we generalized that to instead depend on justify-self; this automatically respects 'direction', but allows alignment on either side without screwing with your text direction, and allows more powerful things too, such as center alignment. (Defined in [section 6.5](https://drafts.csswg.org/css-align/#abspos-sizing).)

CSS2 didn't have any special rules for vertical alignment, tho: if they're both auto, you just treat `bottom` as 0 and then solve normally. So, we didn't follow up and apply the same "upgrade" to abspos+`align-self`.

That seems inconsistent and bad; the self-alignment properties apply in whatever axis the item is "alone" in its container, and abspos elements are alone in both axises. If you set `place-self: center`, it would be annoying and weird for it to center horizontally, but not vertically.

So, the 6.5 rules for sizing/aligning should similarly apply in the vertical axis for align-self.

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

Received on Tuesday, 21 April 2020 23:45:22 UTC