Bug 923193 implemented support for the 'transform-box' property, and bug 1175492 changed the pref added in the first bug so that it covered only transform-box. This bug covers actually shipping our support for 'transform-box' on the release channel. (I'm filing since I noticed there wasn't such a bug.) Spec is at https://drafts.csswg.org/css-transforms/#transform-box What needs to happen before we ship this? Is the concern about shipping over state of the specification or about other things?
As far as I can tell, the issue here is bug 1209061, specifically bug 1209061 comment 6. Specifically the spec says, "For SVG elements without an associated CSS layout box, the used value for border-box is view-box." And Erik points out that, "It seems to me that a used value of 'fill-box' in this case would lead to more easily understood behavior than 'view-box'." I believe Chrome ships with a used value of fill-box so we are waiting to see if Chrome or the spec changes.  https://drafts.csswg.org/css-transforms/#transform-box  https://lists.w3.org/Archives/Public/public-fx/2015JulSep/0075.html
I chased up some Chrome folk at TPAC about this to ask them to fix Chrome to match the spec (or push back on the spec). Might need some more follow up though.
Nasty bug in the current implementation of `transform-box` shipped in Firefox 53 (Dev edition): https://bugzilla.mozilla.org/show_bug.cgi?id=1335876 Ideally, do not ship this to stable until fixed! However, realistically the web compat impact is low: the impact is only shown when `transform-box` is set to a non-default value, and no one else supports it, so there shouldn't be much content affected. But please correct any docs that suggest Firefox now supports transform-box: we don't want devs testing it out & getting even more confused. PS: As for the spec vs Chrome behavior. Please follow the spec. It makes sense, Chrome doesn't. Chrome's behavior is equivalent to transform-box: fill-box for percentage values (of translate or transform-origin) and equivalent to transform-box: view-box for absolute values. Using `transform-box: fill-box` as the universal default is not an option, as it would break all backwards compatibility with the SVG `transform` attribute.
(In reply to Amelia Bellamy-Royds from comment #3) > Nasty bug in the current implementation of `transform-box` shipped in > Firefox 53 (Dev edition): > https://bugzilla.mozilla.org/show_bug.cgi?id=1335876 > > > Ideally, do not ship this to stable until fixed! transform-box is still disabled on Beta and Release builds (even in 53, once 53 becomes Beta): http://searchfox.org/mozilla-central/rev/e95e4ed8b5229a29dacc32c0b90968df5e7a6ff3/modules/libpref/init/all.js#2933-2937 I've added bug 1335876 to this bug's dependency list, so that we remember not to remove this #ifdef until that bug is fixed.
(In reply to Amelia Bellamy-Royds from comment #3) > PS: As for the spec vs Chrome behavior. Please follow the spec. It makes > sense, Chrome doesn't. Agreed. If we're not making headway in getting that addressed then let's ship the sane, spec compliant behavior and dev pressure will hopefully then get them to act. Bug 1335876 is close to being fixed so I'll send out an intent to ship for this shortly.
Jonathan, it seems all blockers were fixed now and good to go. Would you please send out intent to ship and pref on on beta and release channel from Firefox 54 cycle(2 weeks left)?
Created attachment 8841079 [details] [diff] [review] transform-box.txt
(In reply to Astley Chen [:astley] (UTC+8) from comment #6) > Would you please send out intent to ship https://groups.google.com/forum/#!topic/mozilla.dev.platform/ssV6H4_3WGU
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b5d48fabfc27 Enable support for transform-box r=jwatt
Updated compatibility info at https://developer.mozilla.org/en-US/docs/Web/CSS/transform-box and added release note to https://developer.mozilla.org/en-US/Firefox/Releases/55. Sebastian
I created a new issue for updating transform-box to match the latest spec resolutions: https://bugzilla.mozilla.org/show_bug.cgi?id=1371943 Still waiting on final spec text for those resolutions, but most of the discussion can be found in this CSS WG issue: https://github.com/w3c/csswg-drafts/issues/857 Thanks for pushing this forward everyone. Unfortunately, the cost of being first is that you are building on unsteady ground.