Skip to content

[css-lists] Clarify whether ::before and ::after pseudo-elements can be list-items and increment the list-item counter. #3766

Closed
@emilio

Description

@emilio

The following renders differently across browsers:

<!doctype html>
<style>
  li::before, li::after { content: "Before"; display: list-item; }
  li::after { content: "After"; }
</style>
<ol>
  <li>Foo

List item is defined in https://drafts.csswg.org/css-lists/#list-item / https://drafts.csswg.org/css-lists/#declaring-a-list-item, but it doesn't clarify if ::before or ::after are supposed to increment the list item counter.

cc @MatsPalmgren @fantasai @tabatkins

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions