Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-lists] canonical property order of list-style. #2624

Closed
emilio opened this issue Apr 29, 2018 · 19 comments
Closed

[css-lists] canonical property order of list-style. #2624

emilio opened this issue Apr 29, 2018 · 19 comments

Comments

@emilio
Copy link
Collaborator

emilio commented Apr 29, 2018

list-style-type accepts an arbitrary identifier via <counter-style>, and thus should be last, since it can overlap with values of list-style-position.

Otherwise serializing the property and reparsing could generated different results.

@emilio emilio added the css-lists-3 Current Work label Apr 29, 2018
@carlosame
Copy link

carlosame commented May 9, 2018

Hi Emilio,

list-style-type accepts an arbitrary identifier via <counter-style>, and thus should be last, since it can overlap with values of list-style-position.

It is a bit confusing. A counter-style name is a custom identifier, and custom identifiers are defined like "if it can mess with other identifiers, it is invalid". There is the following at:

https://www.w3.org/TR/css3-values/#identifier-value

Note: When designing grammars with <custom-ident>, the <custom-ident> should always be "positionally unambiguous", so that it’s impossible to conflict with any keyword values in the property.

Then, at:

https://www.w3.org/TR/css-counter-styles-3/#at-ruledef-counter-style

you have this:

Note: Note that <custom-ident> also automatically excludes the CSS-wide keywords. In addition, some names, like inside, are valid as counter style names, but conflict with the existing values of properties like list-style, and so won’t be usable there.

So inside is a valid counter-style name, but is "not usable" in the shorthand. That sounds a lot like an invalid <custom-ident>. The "Counter Styles" specification should be changed to declare inside and outside invalid counter-style names.

@emilio
Copy link
Collaborator Author

emilio commented May 9, 2018

Hmm, the problem with that kind of thing is that it prevents you from adding keywords to list-style-position without potentially breaking code...

Plus now you need to also make it invalid in the longhand, or then not serializing it in the shorthand.

Seems strictly worse and more complicated than swapping the values to me...

FF definitely allows you to write list-style-type: inside, and similar. Seems like Blink / WebKit don't implement the <counter-style-name> bits, does any other browser?

cc @upsuper

@carlosame
Copy link

Hmm, the problem with that kind of thing is that it prevents you from adding keywords to list-style-position without potentially breaking code...

But inside and outside are there since the beginning of the shorthand, and counter-styles are a less established feature AFAIR.

Seems strictly worse and more complicated than swapping the values to me...

Not mutually exclusive. Your proposal make things a bit more deterministic, but still potentially confusing to users. I do not have a strong opinion in favour or against it (like if that mattered), but still think that banning those two values would be a good idea.

@carlosame
Copy link

Seems like Blink / WebKit don't implement the bits, does any other browser?

Apparently not, according to browser compatibility table at:

https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style

And my latest Chrome does not support the demo at:

https://mdn.github.io/css-examples/counter-style-demo/

@carlosame
Copy link

So far, I have been thinking here in terms of problems when parsing an author-specified shorthand, however when it concerns serializing:

Otherwise serializing the property and reparsing could generated different results.

Serialization should involve a sanity check of the individual values, that's what I do in my code (admittedly not for all shorthands) and I was assuming that browser people does the same. For example, in tests with real-world sites I found frequent cases where url() PNG images were set to background-color properties, which then bombs a blindly-produced shorthand. So my code checks for those cases.

FF definitely allows you to write list-style-type: inside, and similar.

That should not be a problem if you do not produce a shorthand with it (you could produce a shorthand plus the problematic property:value, or keep all the longhands in the serialization). Perhaps that should be the first thing to check out here.

@upsuper upsuper added the css-counter-styles-3 Current Work label May 11, 2018
@upsuper
Copy link
Member

upsuper commented May 11, 2018

So, we have a precedent for putting <custom-ident> at the end of shorthand to avoid conflicting with other keywords, which is animation. That case is also mentioned in the note of css-values spec as an example of designing "positionally unambiguous" grammar with <custom-ident>.

Given that, I tend to think we should change css-counter-styles to remove that note and change the canonical order of list-style shorthand.

cc @tabatkins

@faceless2
Copy link

faceless2 commented May 31, 2018

(@emilio , thanks for the cross-reference, somehow I missed this issue when I opened #2724)

The example I filed in the other issue I think is worth reproducing here for clarity

@counter-style inside {
...
}
@counter-style outside {
...
}
ul { list-style: inside outside } /* ambiguous */
ol { list-style: inside none } /* ambiguous */
ol { list-style: outside } /* ambiguous */

I'd be against reordering of the list-style shorthand as a solution.

It's currently defined as <list-style-type> || <list-style-position> || <list-style-image>, which allows free reordering of the terms.

If you want to change it to remove the ambiguity introduced by allowing list-style-type to match "inside" or "outside", you're still going to have to allow any order except when the type is called "inside" or "outside". So "list-style: decimal inside" will remain valid, but "list-style: outside inside" where the counter is called "outside" is not.

First, the grammar is going to more complicated then necessary; something like [<list-style-style-type-except-inside-outside> || <list-style-position> || <list-style-image>] | [<list-style-position || <list-style-image>] [inside | outside]?, and that's discounting the special handling that will be required to interpret "none" correctly.

Second, even with an unambiguous grammar it will remain confusing. An author seeing "list-style: inside outside" will have no idea what is going on without consulting the spec.

Given so few browsers implement @counter-style at this stage, personally I feel the best solution is disallowing "inside" and "outside" as counter names. We already do it with "none" so there's precedent. Prevent authors from shooting themselves in the foot.

The second best solution would be not allowing them to be referenced from the list-style shorthand property. As pointed out above, there is no ambiguity except in the list-style shorthand property.

@upsuper
Copy link
Member

upsuper commented May 31, 2018

I've mentioned before, there is precedent. The syntax of animation is

<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]

which should allow free reordering of the terms, but <keyframes-name> is always parsed the latest, and thus something like ease ease is not ambiguous.

@faceless2
Copy link

There are plenty of property shorthands that restrict ordering: font: italic 300px bold is referencing a font called "bold", there's no ambiguity.

But if that is going to be the solution for list-style then it has to be done without breaking the existing syntax, which allows the list-style-type as the first item in the list.

@upsuper
Copy link
Member

upsuper commented May 31, 2018

FWIW, Firefox has been shipping the feature using this syntax for several years, and I don't think I heard any breakage caused by this change.

@upsuper
Copy link
Member

upsuper commented May 31, 2018

By "this syntax", I mean <list-style-position> || <list-style-image> || <list-style-type> for the shorthand, and thus we propose to change the spec to adopt this canonical order.

@tabatkins
Copy link
Member

font isn't a particularly relevant example; it has to have a font-family in it, and that value has to be last, so it's generally "positionally unambiguous".

(There are exceptions to this; if the font-family is "Bold New Font", then font: italic 300px Bold New Font could potentially be parsed as a bold version of "New Font" or as a normal version of "Bold New Font". But it's usually true, unlike the animation example.)

FWIW, Firefox has been shipping the feature using this syntax for several years, and I don't think I heard any breakage caused by this change.

I'm extremely convinced by this argument and thus am fine with it. ^_^

@tabatkins
Copy link
Member

@upsuper I was just doing some testing in Firefox and Chrome, and have a further question.

none is already a valid predefined keyword for both 'list-style-type' and 'list-style-image'. Per spec, you have to treat it as being specified for whichever property doesn't otherwise have something specified. That is, in the following:

<!DOCTYPE html>
<ul><li id=foo>foo<li id=bar>bar</ul>
<style>
#foo { list-style: none decimal; }
#bar { list-style: none url("https://www.xanthir.com/pony"); }
</style>

#foo should show a decimal, and #bar should show a pony.

This conflicts with the suggested treatment of custom list-style-type, which should treat the #bar rule as invalid (as the none gets consumed by 'list-style-image', then you can't match the url() against the remaining grammar terms). So you should get decimal/disc if we're being consistent.

Both Firefox and Chrome disagree with this, in different ways - Firefox implements the current spec, showing decimal/pony. Chrome does the opposite, showing disc/pony. (I presume it just consumes greedily, and gives list-style-type priority, rather than the opposite.) Is this behavior change okay?

@upsuper
Copy link
Member

upsuper commented May 31, 2018

I think this is unrelated to the syntax change, and it's a case of usage of || when multiple items can accept the same value.

In Gecko, what we do is, during parsing value of list-style shorthand, we record number of none we see, and try parsing only non-none parts with parsing function of longhands in the (proposed) canonical order. After that, we check whether number of none is reasonable, and decide which longhands they should fill.

It seems to me this is the only reasonable behavior for handling || in this case. This behavior have been existing in Gecko even longer than the canonical order change, and the canonical order change doesn't affect the behavior on this for us.

It's probably not very common that a shorthand has multiple longhands which accept the same value outside the case of <custom-ident>, and grepping our code, I only find two: one is list-style which can accept none for two longhands, another is columns which can accept auto for two. In Gecko, we handle them in the same manner described above.

@tabatkins
Copy link
Member

All right, it just seems odd that the built-in keyword has different behavior from a custom keyword.

@fantasai
Copy link
Collaborator

@upsuper Updated the spec to match your comment in #2624 (comment) wrt canonical order. Was there anything else that needed to be fixed?

@upsuper
Copy link
Member

upsuper commented Apr 11, 2019

The syntax looks good. Read through the section of the shorthand, it seems there is current a paragraph describing how none in the shorthand can be ambiguous. I guess it would probably be useful to also briefly mention inside and outside are actually ambiguous as well and they may be recognized as list-style-type when there are two such keywords in the shorthand (e.g. list-style: inside outside; means list-style-position: inside; list-style-type: outside;).

ewilligers pushed a commit to ewilligers/web-platform-tests that referenced this issue Jun 24, 2019
Test parsing, serialization and computed value for list-style
and associated longhand properties.
https://drafts.csswg.org/css-lists-3/#list-style-property

list-style-image supports image, including gradients
https://drafts.csswg.org/css-lists-3/#propdef-list-style-image

Colors and lengths in gradients are computed in computed style
results.
w3c/csswg-drafts#4042

calcs giving negative radii are clamped to 0.

list-style uses the new serialization order:
list-style-position list-style-image list-style-type
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

symbolic is omitted in shortest serialization
https://bugzilla.mozilla.org/show_bug.cgi?id=1560494
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 25, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 26, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672325}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jun 27, 2019
Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672325}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 24, 2019
…d spec, a=testonly

Automatic update from web-platform-tests
CSS: list-style shorthand matches updated spec

Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672325}

--

wpt-commits: b97414545be808a5236e579fab30cedbfc058a66
wpt-pr: 17526
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jul 25, 2019
…d spec, a=testonly

Automatic update from web-platform-tests
CSS: list-style shorthand matches updated spec

Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672325}

--

wpt-commits: b97414545be808a5236e579fab30cedbfc058a66
wpt-pr: 17526
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…d spec, a=testonly

Automatic update from web-platform-tests
CSS: list-style shorthand matches updated spec

Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eaechromium.org>
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Cr-Commit-Position: refs/heads/master{#672325}

--

wpt-commits: b97414545be808a5236e579fab30cedbfc058a66
wpt-pr: 17526

UltraBlame original commit: 0b9fd1a749861d2703af37d9caea9ea5699a1c1c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…d spec, a=testonly

Automatic update from web-platform-tests
CSS: list-style shorthand matches updated spec

Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eaechromium.org>
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Cr-Commit-Position: refs/heads/master{#672325}

--

wpt-commits: b97414545be808a5236e579fab30cedbfc058a66
wpt-pr: 17526

UltraBlame original commit: 0b9fd1a749861d2703af37d9caea9ea5699a1c1c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…d spec, a=testonly

Automatic update from web-platform-tests
CSS: list-style shorthand matches updated spec

Update the list-style shorthand
https://drafts.csswg.org/css-lists-3/#list-style-property
to match spec change
w3c/csswg-drafts#2624
w3c/csswg-drafts@8ac1376

The list-style shorthand is now
<list-style-position> || <list-style-image> || <list-style-type>
instead of
<list-style-type> || <list-style-position> || <list-style-image>

Firefox already supports the updated spec.

Bug: 978433
Change-Id: I579c2272390487b429d5fe986c51cdd2041653d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664093
Reviewed-by: Emil A Eklund <eaechromium.org>
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Cr-Commit-Position: refs/heads/master{#672325}

--

wpt-commits: b97414545be808a5236e579fab30cedbfc058a66
wpt-pr: 17526

UltraBlame original commit: 0b9fd1a749861d2703af37d9caea9ea5699a1c1c
@fantasai
Copy link
Collaborator

fantasai commented Jul 8, 2020

@upsuper Added a note,

Note: The <counter-style> values of list-style-type can also create grammatical ambiguities. As such values are ultimately <custom-ident> values, the parsing rules in [CSS-VALUES-3] apply.

@cdoublev
Copy link
Collaborator

The note seems rather vague to me, whereas animation is more explicit. And serializing also requires to output an explicit outside for list-style-position when list-style-type is inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment