Skip to content

[css-content] Clarify "parent" in quotes: auto #14944

Backlog

Description

@Loirooriol

https://drafts.csswg.org/css-content/#valdef-quotes-auto

A typographically appropriate quotation mark system is automatically chosen by the UA based on the content language of the parent (or, if there is no parent, of the element itself).

What exactly does "parent" mean? quotes basically affects how content resolves quotes, and quotes only work on pseudo-elements.

So for a pseudo-element, "parent" could mean:

  1. The originating element
  2. The parent of the originating element
  3. The parent of the ultimate originating element

Generally I would expect (1), but pseudo-elements can't have a lang attribute, so it would be kind of pointless to use the content language of the originating element instead of the pseudo itself.

<!DOCTYPE html>
<style>
div::before { content: open-quote close-quote; display: list-item; list-style-position: inside; color: cyan }
div::before::marker { content: open-quote close-quote; color: magenta }
</style>
<body lang="fr">fr
  <div lang="de">de,
    <div lang="sv">sv,
      <div lang="nl">nl,
        <div lang="en">en</div>
      </div>
    </div>
  </div>
</body>
Firefox Chrome
imatge imatge

So Firefox seems to be using (2), and Chrome (1)?

I suspect the intention was actually (3), though.

Activity

  1. Loirooriol commented on Dec 4, 2026

    @Loirooriol
    ContributorAuthor

    In servo/servo#50517 I'm going with the parent of the ultimate originating element (3), but the difference isn't observable since ::before::marker is broken in Servo.

  2. Loirooriol commented on Dec 4, 2026

    @Loirooriol
    ContributorAuthor

    @jfkthame Do you agree the Firefox behavior seems weird?

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

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