Re: [csswg-drafts] [css-align] Center alignment can be improved (#4659)

The CSS Working Group just discussed `Center alignment can be improved`, and agreed to the following:

* `RESOLVED: Accept the text in current ED and open bugs on browsers to implement.`

<details><summary>The full IRC log of that discussion</summary>
&lt;heycam> Topic: Center alignment can be improved<br>
&lt;heycam> github: https://github.com/w3c/csswg-drafts/issues/4659<br>
&lt;TabAtkins> https://drafts.csswg.org/css-align/#abspos-sizing<br>
&lt;heycam> TabAtkins: the diagram shows how alignment affects the available space for sizing static positioned abspos elements<br>
&lt;heycam> ... you have the abspos containing block<br>
&lt;heycam> ... you have the parent of the abspos (the static pos containing block)<br>
&lt;heycam> ... and you have the abs pos child<br>
&lt;heycam> ... it's statically positioned in the horiziontal axis<br>
&lt;heycam> ... we look at justify-self for alignment<br>
&lt;heycam> ... historically we had one rule to do this, based on direction<br>
&lt;heycam> ... here we're letting you specify that manually<br>
&lt;heycam> ... if start aligned, it does what you expect<br>
&lt;heycam> ... the space to align into starts on the start edge where teh static position is, and goes to the end of the abspos containing block<br>
&lt;heycam> ... it sits in ths same spot, but grows to where 0 would be<br>
&lt;heycam> ... if you'are end, you do the opposite, growing to where left:0 would give you<br>
&lt;heycam> fantasai: this is the behavior fro RTL text<br>
&lt;heycam> TabAtkins: how do you do cetner?<br>
&lt;heycam> ... previously the spec said you use this box [points to blackboard]<br>
&lt;heycam> ... you can't get bigger than the abspos containing block, which is weird because the other alignments can<br>
&lt;heycam> ... Ian's suggestion is to let it grow from both sides until one side would hit the edge of the abspos containing block<br>
&lt;heycam> ... it's cnetered in the expected space, but gets as large as it can<br>
&lt;heycam> iank_: this is EdgeHTML's behavior<br>
&lt;heycam> ... we'll have this when we pick up our new flex impl<br>
&lt;heycam> ... we've added some tentative tests<br>
&lt;heycam> TabAtkins: nobody currently center aligns according to the current spec<br>
&lt;heycam> ... I've edited this into the spec<br>
&lt;heycam> dbaron: this is the width you end up with auto width<br>
&lt;heycam> TabAtkins: if you have enough content<br>
&lt;heycam> fantasai: fun side effect, this makes it possible to interpolate between all three values<br>
&lt;heycam> ... since it's between the other two values<br>
&lt;heycam> iank_: this fell out beacuse we were adding static center positions in our new arch, and this was the obvious thing that fell out<br>
&lt;heycam> ... was relatively easy for us to do<br>
&lt;heycam> dbaron: I didn't realise we implemented this section of the spec at all, I'm ok with this<br>
&lt;heycam> cbiesinger: we only implement this for flex boxes?<br>
&lt;heycam> iank_: we get the available size more wrong<br>
&lt;heycam> cbiesinger: but we only do this if the parent is a flex box?<br>
&lt;heycam> iank_: yes<br>
&lt;heycam> ... only applies in implementations with flex boxes<br>
&lt;heycam> dbaron: then it makes more sense to me that we implement it<br>
&lt;heycam> ... because in theory this should be implemented for blocks too<br>
&lt;heycam> ... as I've mentioned before, I'm worried we'll be unable to implement this for block<br>
&lt;heycam> heycam: is Chrome implementing block alignment as part of your rewrite?<br>
&lt;heycam> iank_: not currently.  but the new arch does make it easier to implement<br>
&lt;heycam> astearns: can you get into this situation with abs positioning as well?<br>
&lt;heycam> iank_: I don't think so<br>
&lt;heycam> astearns: given this was not well specified before, can you open bugs on impls to match the current text?<br>
&lt;heycam> TabAtkins: sure<br>
&lt;heycam> rego: so it applies in grid too?<br>
&lt;heycam> TabAtkins: in all places that use this text, so flexbox, grid, and theoretically block<br>
&lt;heycam> RESOLVED: Accept the text in current ED and open bugs on browsers to implement.<br>
&lt;heycam> cbiesinger: can we add WPT tests?<br>
&lt;heycam> iank_: I already have<br>
&lt;RossenF2F> tantek_, probably because folks go in/out of mic proximity<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4659#issuecomment-577211422 using your GitHub account

Received on Wednesday, 22 January 2020 14:39:38 UTC