Intent to Implement and Ship: CSS Box Alignment shorthands

88 views
Skip to first unread message

Javier Fernandez

unread,
Feb 24, 2017, 6:00:07 AM2/24/17
to blink-dev
*Contact emails*
jfern...@igalia.com

*Spec*
https://drafts.csswg.org/css-align-3/#propdef-place-content
https://drafts.csswg.org/css-align-3/#place-self-property
https://drafts.csswg.org/css-align-3/#place-items-property

*Summary*
Shorthand properties to control alignment along block and inline axes in
a single declaration.

*Motivation*
In order to ease the control of the alignment behavior in the different
dimensions, the spec defines now new shorthands:
* place-content: This shorthand property sets both the align-content
and justify-content properties in one declaration.
* place-self: This shorthand property sets both the align-self and
justify-self properties in a single declaration.
* place-items: This shorthand property sets both the align-items and
justify-items properties in a single declaration.

*Interoperability risk*
The risk is low in my opinion:
* Firefox already implemented and shipped these 3 shorthands.
* I'm implementing the feature in WebKit as well.
* Positive public signals from browser vendors and users.

The main risk comes from the fact that the spec isn't CR yet, so it may
introduce changes in the syntax of these new shorthands.

*Compatibility risk*
The new exposed properties don't provide any behavior change, so I think
there is no compatibility risk on shipping the feature.

*OWP launch tracking bug*
https://crbug.com/668639

*Link to entry on the Chrome Platform Status*
https://www.chromestatus.com/feature/4689076657586176

*Requesting approval to ship?*
Yes.

TAMURA, Kent

unread,
Feb 26, 2017, 3:15:17 PM2/26/17
to Javier Fernandez, blink-dev
LGTM1

--
TAMURA Kent
Software Engineer, Google


Philip Jägenstedt

unread,
Feb 27, 2017, 10:18:05 AM2/27/17
to TAMURA, Kent, Javier Fernandez, blink-dev
Can you confirm that the properties to which these shorthands expand are all shipping and will not be changed at all? If so, this seems trivial, LGTM2.

Javier Fernandez

unread,
Feb 27, 2017, 12:56:25 PM2/27/17
to Philip Jägenstedt, TAMURA, Kent, blink-dev, jacka...@gmail.com
Hi,

I can confirm that the longhand properties are all shipping, but the CSS
Box Alignment spec is not CR yet so I can't ensure there won't be any
change. However, justify-{content, items,
self} are already defined by Flexbox, hence widely used during the last
years. The family
align-{content, items, self} is just defining the same CSS logic in the
block-axis, so I doubt
there will be changes on the values of these properties.

I'll add Tab Atkins to the loop, just in case he has something to add.

On 02/27/2017 04:17 PM, Philip Jägenstedt wrote:
> Can you confirm that the properties to which these shorthands expand are
> all shipping and will not be changed at all? If so, this seems trivial,
> LGTM2.
>
> On Mon, Feb 27, 2017 at 3:15 AM TAMURA, Kent <tk...@chromium.org
> <mailto:tk...@chromium.org>> wrote:
>
> LGTM1
>
>
> On Fri, Feb 24, 2017 at 7:59 PM, Javier Fernandez
> <jfern...@igalia.com <mailto:jfern...@igalia.com>> wrote:
>
> *Contact emails*
> jfern...@igalia.com <mailto:jfern...@igalia.com>

Philip Jägenstedt

unread,
Feb 27, 2017, 1:10:30 PM2/27/17
to Javier Fernandez, TAMURA, Kent, blink-dev, jacka...@gmail.com, Shane Stephens
We should of course make note of it, but in general we don't put a lot of weight on the formal status of the spec. Given the fact that Gecko is already shipping this, if compatible implementations ship in Blink and WebKit, and if there are tests proving them interoperable, then the bar for changing the spec should be extremely high.

Shipping effectively (further) constrains the CSS WG from making changes, so we should tell them about it. Tab, Shane, can either of you make the appropriate noises?

Rick Byers

unread,
Feb 27, 2017, 4:32:40 PM2/27/17
to Philip Jägenstedt, Javier Fernandez, TAMURA, Kent, blink-dev, Tab Atkins Jr., Shane Stephens, fantasai
/cc fantasai@ - the other editor of this spec in case she has any feedback on Chromium shipping these properties now.  Given that they're already shipping in Gecko, the additional risk of shipping in Chromium seems small to me.

Do you have a Gecko bug for these?  Maybe it's this one?  I can't find any entry on Firefox platform status, MDN or caniuse. From my tests It looks like they're in Firefox 52 which is currently in beta (so not necessarily shipped for good yet, but should be in about a week).

Are there any tests for these properties in csswg-test or web-platform-tests?

fantasai

unread,
Feb 27, 2017, 5:04:34 PM2/27/17
to Rick Byers, Philip Jägenstedt, Javier Fernandez, TAMURA, Kent, blink-dev, Tab Atkins Jr., Shane Stephens
On 02/27/2017 04:32 PM, Rick Byers wrote:
> /cc fantasai@ - the other editor of this spec in case she has any feedback on Chromium shipping these properties now. Given
> that they're already shipping in Gecko, the additional risk of shipping in Chromium seems small to me.
>
> Do you have a Gecko bug for these? Maybe it's this one <https://bugzilla.mozilla.org/show_bug.cgi?id=1105571>? I can't find
> any entry on Firefox platform status <https://platform-status.mozilla.org/>, MDN or caniuse. From my tests It looks like
> they're in Firefox 52 which is currently in beta (so not necessarily shipped for good yet, but should be in about a week).

Anything syntax that's part of Flexbox or directly analogous (i.e. start vs flex-start)
should be clear to ship--they're locked down by virtue of having shipped in Flexbox
already. Other things may also change a bit, but the latest publication trimmed out the
most-likely-problematic bits. See
https://lists.w3.org/Archives/Public/www-style/2017Feb/0071.html
for the latest status update.

We're gonna try to get the spec in CR ASAP, which'll hopefully be in April or so.
(Tab and I have a work week mid-March where we should be able to clear out any
remaining issues, plus a week or two to follow up with the CSSWG.)

Review comments from your team are always helpful, if there's anything that's
unclear or not quite right in the spec, or if you have any thoughts on the open
issues. :) Areas of concern are marked in the email linked above.

> Are there any tests for these properties in csswg-test or web-platform-tests?

https://test.csswg.org/shepherd/search/spec/css-align-3/ lists what we have.

~fantasai

Boris Zbarsky

unread,
Feb 27, 2017, 5:48:25 PM2/27/17
to Rick Byers, Philip Jägenstedt, Javier Fernandez, TAMURA, Kent, blink-dev, Tab Atkins Jr., Shane Stephens, fantasai
On 2/27/17 4:32 PM, Rick Byers wrote:
> Do you have a Gecko bug for these?

https://bugzilla.mozilla.org/show_bug.cgi?id=1319958 is what you're
looking for, I think.

And you're correct: these are not implemented in versions before 52.

> I can't find
> any entry on Firefox platform status
> <https://platform-status.mozilla.org/>, MDN or caniuse.

The MDN docs haven't been done yet; hence the "dev-doc-needed"
annotation on the above-linked bug...

> Are there any tests for these properties in csswg-test or
> web-platform-tests?

We added some tests in the Firefox reftests; see
https://bug1319958.bmoattachments.org/attachment.cgi?id=8813932 for the
diff that did that.

We're not really using wpt reftests as our main reftests yet,
unfortunately. :(

-Boris

Chris Harrelson

unread,
Feb 28, 2017, 8:59:20 PM2/28/17
to Boris Zbarsky, Rick Byers, Philip Jägenstedt, Javier Fernandez, TAMURA, Kent, blink-dev, Tab Atkins Jr., Shane Stephens, fantasai
LGTM3



--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.


Rick Byers

unread,
Feb 28, 2017, 11:05:58 PM2/28/17
to Chris Harrelson, fantasai, TAMURA, Kent, Javier Fernandez, Philip Jägenstedt, Shane Stephens, Boris Zbarsky, Tab Atkins Jr., blink-dev
Whoops, I meant to LGTM this also.  Thanks everyone!

Manuel Rego Casasnovas

unread,
Mar 22, 2017, 11:25:18 AM3/22/17
to blink-dev, Rick Byers, Philip Jägenstedt, Javier Fernandez, TAMURA, Kent, Tab Atkins Jr., Shane Stephens, fantasai

On 27/02/17 22:32, Rick Byers wrote:
> Are there any tests for these properties in csswg-test or
> web-platform-tests?

JFYI, we've been creating a few tests for these shortands on csswg-test
repository and they're now imported into Blink (http://crbug.com/703592).
We plan to keep adding more tests there as the implementation evolves.

Cheers,
Rego
Reply all
Reply to author
Forward
0 new messages