[csswg-drafts] [css-lists][css-pseudo] the 'content' property should apply to ::marker (#3499)

MatsPalmgren has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-lists][css-pseudo] the 'content' property should apply to ::marker ==
The spec for the [`content`](https://drafts.csswg.org/css-content-3/#content-property) property says that it applies to [tree-abiding pseudo-elements](https://drafts.csswg.org/css-pseudo-4/#treelike).  [`::marker`](https://drafts.csswg.org/css-pseudo-4/#marker-pseudo) is a tree-abiding pseudo-element, however it explicitly excludes the `content` property.

I think this is a mistake, the `::marker` pseudo would be much more useful if `content` could be used on it. Making `::marker` more like `::before/::after` would also make it easier to understand, to specify and implement, since it wouldn't need to be treated specially.  I think this would benefit all stake holders:

- spec authors: could stop duplicating parts of `content` in [list-style-image](https://drafts.csswg.org/css-lists-3/#image-markers) and [list-style-type](https://drafts.csswg.org/css-lists-3/#text-markers) and instead share more spec text for `::marker/::before/::after`.
- implementors: instead of writing [a lot of specialized code](https://searchfox.org/mozilla-central/source/layout/generic/nsBulletFrame.cpp) for "list markers", we could re-use the code we already have for `::before/::after`to also handle `::marker`. This means less code to write and maintain.
- authors: adding support for the `content` property would make `::marker` significantly more powerful.
- end users: hopefully, the improvements in all levels above will result in richer content and less buggy browsers for users to enjoy.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3499 using your GitHub account

Received on Wednesday, 9 January 2019 18:27:31 UTC