Intent to Implement and Ship: Accept two values in the overflow shorthand

51 views
Skip to first unread message

Chris Nardi

unread,
Apr 14, 2018, 11:00:44 PM4/14/18
to blink-dev
cna...@chromium.org https://github.com/w3c/csswg-drafts/issues/2484 (the spec has not been edited yet, but the proposal was accepted by WG resolution)
The overflow shorthand was updated to accept two values in order to make it easier to set overflow-x and overflow-y to different values at the same time. If two values are specified, the first value specifies the value of overflow-x and the second value specifies the value of overflow-y.

The tracking bug for this change is https://crbug.com/833105.

The overflow shorthand previously only accepted one value, meaning that if a developer wanted to set overflow-x and overflow-y to different values (like other shorthands), they would be forced to write both longhand statements. This reduces complexity by allowing developers to specify both values through a single statement.

Risks

Interoperability and Compatibility

Previously invalid code will now become valid, but Firefox has also implemented this change, limiting the risk as developers will be forced to update their code if it was previously invalid and creates issues.


Edge: No signals

Firefox: Landed on April 12th (https://bugzilla.mozilla.org/show_bug.cgi?id=1453148 and https://groups.google.com/forum/#!topic/mozilla.dev.platform/4vy-a5_a35o)

Safari: No signals

Web developers: No signals


Ergonomics

n/a


Activation

Documentation on MDN will be updated to reflect this change.


Debuggability

No changes to DevTools should be needed.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Is this feature fully tested by web-platform-tests?

Yes, https://github.com/w3c/web-platform-tests/blob/master/css/css-overflow/overflow-shorthand-001.html was added by the Firefox implementation, and existing CSSOM tests will be modified by this change.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5090725653905408


Requesting approval to ship?

Yes.



Mike West

unread,
Apr 17, 2018, 3:21:10 AM4/17/18
to cna...@chromium.org, blink-dev
LGTM1. Following along with Firefox's action here seems reasonable, and will reduce the risk of developer confusion. Have y'all filed bugs against Edge and Safari to follow suit?

-mike

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXZydcJzvHSh95ew-3Jq7jP0mLy88%3DJz-vcz%3D5S8F%2Bd0-w2Jg%40mail.gmail.com.

Chris Nardi

unread,
Apr 17, 2018, 10:37:31 AM4/17/18
to Mike West, blink-dev

Chris Nardi

unread,
Apr 25, 2018, 12:22:46 PM4/25/18
to Mike West, blink-dev
Friendly ping in case this got buried.

Chris

Yoav Weiss

unread,
Apr 26, 2018, 5:31:07 AM4/26/18
to Chris Nardi, blink-dev
On Sun, Apr 15, 2018 at 5:00 AM Chris Nardi <cna...@chromium.org> wrote:
cna...@chromium.org https://github.com/w3c/csswg-drafts/issues/2484 (the spec has not been edited yet, but the proposal was accepted by WG resolution)

The spec PR has landed in https://github.com/w3c/csswg-drafts/pull/2576 right?
 
The overflow shorthand was updated to accept two values in order to make it easier to set overflow-x and overflow-y to different values at the same time. If two values are specified, the first value specifies the value of overflow-x and the second value specifies the value of overflow-y.

The tracking bug for this change is https://crbug.com/833105.

The overflow shorthand previously only accepted one value, meaning that if a developer wanted to set overflow-x and overflow-y to different values (like other shorthands), they would be forced to write both longhand statements. This reduces complexity by allowing developers to specify both values through a single statement.

Risks

Interoperability and Compatibility

Previously invalid code will now become valid, but Firefox has also implemented this change, limiting the risk as developers will be forced to update their code if it was previously invalid and creates issues.


That's a bit optimistic :)

Overall, I think there's *some* compat risk here, and it would be tricky to detect. Furthermore, Firefox shipping this means that any use-counters we add now would not be able to distinguish between new content which adopts this change and old, invalid code.

At the same time, the risk for breakage doesn't seem huge, and we won't apply any overflow values that the developer didn't put there in the first place.

So, LGTM2 to follow Mozilla here (but to also pay close attention to breakage reports coming in from the Canary/dev/beta channels). 


Edge: No signals

Firefox: Landed on April 12th (https://bugzilla.mozilla.org/show_bug.cgi?id=1453148 and https://groups.google.com/forum/#!topic/mozilla.dev.platform/4vy-a5_a35o)

Safari: No signals

Web developers: No signals


Ergonomics

n/a


Activation

Documentation on MDN will be updated to reflect this change.


Debuggability

No changes to DevTools should be needed.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Is this feature fully tested by web-platform-tests?

Yes, https://github.com/w3c/web-platform-tests/blob/master/css/css-overflow/overflow-shorthand-001.html was added by the Firefox implementation, and existing CSSOM tests will be modified by this change.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5090725653905408


Requesting approval to ship?

Yes.



--
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+...@chromium.org.

Chris Nardi

unread,
Apr 26, 2018, 9:47:56 AM4/26/18
to Yoav Weiss, blink-dev
On Thu, Apr 26, 2018 at 5:30 AM, Yoav Weiss <yo...@yoav.ws> wrote:


On Sun, Apr 15, 2018 at 5:00 AM Chris Nardi <cna...@chromium.org> wrote:
cna...@chromium.org https://github.com/w3c/csswg-drafts/issues/2484 (the spec has not been edited yet, but the proposal was accepted by WG resolution)

The spec PR has landed in https://github.com/w3c/csswg-drafts/pull/2576 right?

Yep, the spec has now been updated for this change
The overflow shorthand was updated to accept two values in order to make it easier to set overflow-x and overflow-y to different values at the same time. If two values are specified, the first value specifies the value of overflow-x and the second value specifies the value of overflow-y.

The tracking bug for this change is https://crbug.com/833105.

The overflow shorthand previously only accepted one value, meaning that if a developer wanted to set overflow-x and overflow-y to different values (like other shorthands), they would be forced to write both longhand statements. This reduces complexity by allowing developers to specify both values through a single statement.

Risks

Interoperability and Compatibility

Previously invalid code will now become valid, but Firefox has also implemented this change, limiting the risk as developers will be forced to update their code if it was previously invalid and creates issues.


That's a bit optimistic :)

Overall, I think there's *some* compat risk here, and it would be tricky to detect. Furthermore, Firefox shipping this means that any use-counters we add now would not be able to distinguish between new content which adopts this change and old, invalid code.

At the same time, the risk for breakage doesn't seem huge, and we won't apply any overflow values that the developer didn't put there in the first place.

So, LGTM2 to follow Mozilla here (but to also pay close attention to breakage reports coming in from the Canary/dev/beta channels). 
 
Agreed, I'm never sure how to approach compatibility risk for new syntax as it's unlikely to break the world, but it's also greater than zero. Thank you for the wording!

Edge: No signals

Firefox: Landed on April 12th (https://bugzilla.mozilla.org/show_bug.cgi?id=1453148 and https://groups.google.com/forum/#!topic/mozilla.dev.platform/4vy-a5_a35o)

Safari: No signals

Web developers: No signals


Ergonomics

n/a


Activation

Documentation on MDN will be updated to reflect this change.


Debuggability

No changes to DevTools should be needed.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Is this feature fully tested by web-platform-tests?

Yes, https://github.com/w3c/web-platform-tests/blob/master/css/css-overflow/overflow-shorthand-001.html was added by the Firefox implementation, and existing CSSOM tests will be modified by this change.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5090725653905408


Requesting approval to ship?

Yes.



--
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.

Daniel Bratell

unread,
Apr 26, 2018, 11:17:02 AM4/26/18
to Yoav Weiss, Chris Nardi, blink-dev
LGTM3

/Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXZydcrhnzRk07RAiOdw%3DLweF716Vja3VJCpukXAc19jhvSxg%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CEST (UTC+2) */
Reply all
Reply to author
Forward
0 new messages