Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to ship: CSS Shapes Module Level 1 (partial)

134 views
Skip to first unread message

Ting-Yu Lin

unread,
Nov 29, 2017, 6:03:49โ€ฏAM11/29/17
to dev-platform
CSS Shapes Module Level 1 [1] defines three properties: "shape-outside",
"shape-margin", and "shape-image-threshold" (used with shape-outside:
<image>), which allows the users to define non-rectangular shapes for
floating elements.

See the previous discussion for the main bug, pref, and examples in the
"Intent to implement" thread [2]. Also, no notable changes to the spec
since last "intent to implement" mail.

web-platform-tests is under
"web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/"

At the time of writing, all values of "shape-outside" have been implemented
except <image>, and we already have shape path editor in devtool for
<basic-shap>. [3]

We can ship all the properties in this module at once, or we could probably
divide it into two stages, and ship it to the user incrementally.

For example, stage 1 is to ship shape-outside" (except <Image> value) and
"shape-margin", and stage 2 is to ship the remaining "shape-outside:
<image>" and "shape-image-threshold". If everything goes well, stage 1 is
targeting at Firefox 59.

The downside of the two-stage roll-out could raise web-compat issues
because Blink and Webkit already support the entire module.

Any suggestions are welcome.

[1] W3C Candidate Recommendation https://www.w3.org/TR/css-shapes/
[2]
https://groups.google.com/d/msg/mozilla.dev.platform/PhG4Upk4Mo4/ie0Mr2xsBAAJ
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1242029

Geoffrey Sneddon

unread,
Nov 29, 2017, 9:08:46โ€ฏAM11/29/17
to Ting-Yu Lin, dev-platform
On Wed, Nov 29, 2017 at 11:03 AM, Ting-Yu Lin <tl...@mozilla.com> wrote:
> CSS Shapes Module Level 1 [1] defines three properties: "shape-outside",
> "shape-margin", and "shape-image-threshold" (used with shape-outside:
> <image>), which allows the users to define non-rectangular shapes for
> floating elements.
>
> See the previous discussion for the main bug, pref, and examples in the
> "Intent to implement" thread [2]. Also, no notable changes to the spec
> since last "intent to implement" mail.
>
> web-platform-tests is under
> "web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/"

There are also tests in css/css-shapes within WPT.

/g

James Graham

unread,
Nov 29, 2017, 2:40:22โ€ฏPM11/29/17
to dev-pl...@lists.mozilla.org
On 29/11/17 11:03, Ting-Yu Lin wrote:
> CSS Shapes Module Level 1 [1] defines three properties: "shape-outside",
> "shape-margin", and "shape-image-threshold" (used with shape-outside:
> <image>), which allows the users to define non-rectangular shapes for
> floating elements.
>
> See the previous discussion for the main bug, pref, and examples in the
> "Intent to implement" thread [2]. Also, no notable changes to the spec
> since last "intent to implement" mail.
>
> web-platform-tests is under
> "web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/"

It's great that we're adding tests for this. As a broader conversation,
I would like to work out what's required to move away from using the
css/vendor-imports directory for layout reftests.

As far as I know it's only Gecko using that directory, and I think that
continuing to put our tests there is problematic because it increases
the chance that other vendors simply won't realise that there are tests
they should be paying attention to (e.g. when looking at
https://wpt.fyi) compared to putting them under css/<specname>/ in the
same way as all other CSS tests (including those upstreamed from Blink).

Mats Palmgren

unread,
Nov 29, 2017, 3:16:59โ€ฏPM11/29/17
to Ting-Yu Lin, dev-platform
On 11/29/17 12:03 PM, Ting-Yu Lin wrote:
> We can ship all the properties in this module at once, or we could probably
> divide it into two stages, and ship it to the user incrementally.
>
> For example, stage 1 is to ship shape-outside" (except <Image> value) and
> "shape-margin", and stage 2 is to ship the remaining "shape-outside:
> <image>" and "shape-image-threshold". If everything goes well, stage 1 is
> targeting at Firefox 59.


I think supporting only a subset of the valid values for a property
is problematic.

CSS conformance rules says:
"[...] the user agent must parse the value according to the property
definition. This means that the user agent must accept all valid values
and must ignore declarations with invalid values."
https://www.w3.org/TR/CSS21/conform.html

Shipping support for a subset of the properties in a spec might make sense
in some cases, but since you say:

> The downside of the two-stage roll-out could raise web-compat issues
> because Blink and Webkit already support the entire module.

it's not probably not a good idea in this case, for web-compat reasons.


/Mats

Mats Palmgren

unread,
Nov 29, 2017, 3:17:05โ€ฏPM11/29/17
to Ting-Yu Lin, dev-platform
On 11/29/17 12:03 PM, Ting-Yu Lin wrote:
> We can ship all the properties in this module at once, or we could probably
> divide it into two stages, and ship it to the user incrementally.
>
> For example, stage 1 is to ship shape-outside" (except <Image> value) and
> "shape-margin", and stage 2 is to ship the remaining "shape-outside:
> <image>" and "shape-image-threshold". If everything goes well, stage 1 is
> targeting at Firefox 59.


I think supporting only a subset of the valid values for a property
is problematic.

CSS conformance rules says:
"[...] the user agent must parse the value according to the property
definition. This means that the user agent must accept all valid values
and must ignore declarations with invalid values."
https://www.w3.org/TR/CSS21/conform.html

Shipping support for a subset of the properties in a spec might make sense
in some cases, but since you say:

> The downside of the two-stage roll-out could raise web-compat issues
> because Blink and Webkit already support the entire module.

Xidorn Quan

unread,
Nov 29, 2017, 4:21:55โ€ฏPM11/29/17
to dev-pl...@lists.mozilla.org
On Thu, Nov 30, 2017, at 07:16 AM, Mats Palmgren wrote:
> I think supporting only a subset of the valid values for a property
> is problematic.
>
> CSS conformance rules says:
> "[...] the user agent must parse the value according to the property
> definition. This means that the user agent must accept all valid values
> and must ignore declarations with invalid values."
> https://www.w3.org/TR/CSS21/conform.html

It simply means we cannot state we are conformant to that spec in stage
1. That's not something seriously problematic.

> Shipping support for a subset of the properties in a spec might make
> sense
> in some cases, but since you say:
>
> > The downside of the two-stage roll-out could raise web-compat issues
> > because Blink and Webkit already support the entire module.
>
> it's not probably not a good idea in this case, for web-compat reasons.

I'm not too concerned about this, actually. It really depends on whether
web-compat issues from lacking of <image> support is worse than not
supporting the property at all.

I would argue that it isn't the case. shape-outside is mostly a cosmetic
feature, and lack of support would unlikely cause anything more than
some undesired appearance. In that case, authors probably don't even
bother to use a feature detection at all. shape-outside itself has a
popularity of 0.49% on Chrome Platform Status, which seems to be
reasonably high, and I would be surprised if majority of that is using
<image> rather than the simpler shape functions.

Because of that, I don't really think web-compat would be a big issue
for shipping this in two stages.

- Xidorn

L. David Baron

unread,
Nov 29, 2017, 6:38:24โ€ฏPM11/29/17
to Xidorn Quan, dev-pl...@lists.mozilla.org
On Thursday 2017-11-30 08:21 +1100, Xidorn Quan wrote:
> On Thu, Nov 30, 2017, at 07:16 AM, Mats Palmgren wrote:
> > I think supporting only a subset of the valid values for a property
> > is problematic.
> >
> > CSS conformance rules says:
> > "[...] the user agent must parse the value according to the property
> > definition. This means that the user agent must accept all valid values
> > and must ignore declarations with invalid values."
> > https://www.w3.org/TR/CSS21/conform.html
>
> It simply means we cannot state we are conformant to that spec in stage
> 1. That's not something seriously problematic.
>
> > Shipping support for a subset of the properties in a spec might make
> > sense
> > in some cases, but since you say:
> >
> > > The downside of the two-stage roll-out could raise web-compat issues
> > > because Blink and Webkit already support the entire module.
> >
> > it's not probably not a good idea in this case, for web-compat reasons.
>
> I'm not too concerned about this, actually. It really depends on whether
> web-compat issues from lacking of <image> support is worse than not
> supporting the property at all.
>
> I would argue that it isn't the case. shape-outside is mostly a cosmetic
> feature, and lack of support would unlikely cause anything more than
> some undesired appearance. In that case, authors probably don't even
> bother to use a feature detection at all. shape-outside itself has a
> popularity of 0.49% on Chrome Platform Status, which seems to be
> reasonably high, and I would be surprised if majority of that is using
> <image> rather than the simpler shape functions.
>
> Because of that, I don't really think web-compat would be a big issue
> for shipping this in two stages.

I agree with Xidorn's conclusions. I'm skeptical of one of the
arguments, though, since I think "mostly a cosmetic feature" can be
said about many things that cause webpages to be unusable when they
don't work correctly.

I think if the remainder of the feature can be done soon then it may
make sense to wait to ship the whole thing together, but if there's
something that makes the image part hard or unlikely to happen soon,
then it's reasonable to ship the part we have done, as long as the
part that we parse matches the part that we support.

-David

--
๐„ž L. David Baron http://dbaron.org/ ๐„‚
๐„ข Mozilla https://www.mozilla.org/ ๐„‚
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
signature.asc

Ting-Yu Lin

unread,
Nov 30, 2017, 5:15:53โ€ฏAM11/30/17
to L. David Baron, Xidorn Quan, dev-platform
Thank you for all the feedback. I feel the safest plan is to ship the entire
module at once. It also saves some work to implement two preferences to
exclude the shape-outside: <image> value which we don't render in the first
stage.

I'm implementing "shape-outside: <image>", and will do "shape-margin" after
that. My gut feeling is that the entire module can be completed before
Firefox 60, which is a cycle late than the two-stages plan.

Ting-Yu


On Thu, Nov 30, 2017 at 7:37 AM, L. David Baron <dba...@dbaron.org> wrote:

> On Thursday 2017-11-30 08:21 +1100, Xidorn Quan wrote:
> > On Thu, Nov 30, 2017, at 07:16 AM, Mats Palmgren wrote:
> > > I think supporting only a subset of the valid values for a property
> > > is problematic.
> > >
> > > CSS conformance rules says:
> > > "[...] the user agent must parse the value according to the property
> > > definition. This means that the user agent must accept all valid values
> > > and must ignore declarations with invalid values."
> > > https://www.w3.org/TR/CSS21/conform.html
> >
> > It simply means we cannot state we are conformant to that spec in stage
> > 1. That's not something seriously problematic.
> >
> > > Shipping support for a subset of the properties in a spec might make
> > > sense
> > > in some cases, but since you say:
> > >
> > > > The downside of the two-stage roll-out could raise web-compat issues
> > > > because Blink and Webkit already support the entire module.
> > >
> > > it's not probably not a good idea in this case, for web-compat reasons.
> >
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
>

Tantek ร‡elik

unread,
Dec 19, 2017, 2:23:27โ€ฏAM12/19/17
to Ting-Yu Lin, Xidorn Quan, L. David Baron, dev-platform
On Thu, Nov 30, 2017 at 2:15 AM, Ting-Yu Lin <tl...@mozilla.com> wrote:
> Thank you for all the feedback. I feel the safest plan is to ship the entire
> module at once. It also saves some work to implement two preferences to
> exclude the shape-outside: <image> value which we don't render in the first
> stage.

Thanks for gathering all the feedback Ting-Yu. I agree with your
conclusion of shipping the entire module at once.


> I'm implementing "shape-outside: <image>", and will do "shape-margin" after
> that. My gut feeling is that the entire module can be completed before
> Firefox 60, which is a cycle late than the two-stages plan.

When you feel confident (perhaps beyond "gut feeling") that we can
land/ship the entire module in 60, could you send an updated Intent to
Ship for the entire module accordingly?

Thanks much!

Tantek
0 new messages