Skip to content

[css-content] content: "" should probably generate no text nodes #9606

Open
@emilio

Description

@emilio

... because an empty text node would generate a baseline. Here's a test-case that shows the difference on Chromium (because Chromium has a bogus optimization that prevents an empty text node from having a layout box unless editable).

https://drafts.csswg.org/css-content/#strings is not particularly clear on what exactly the generated DOM would look like for content: "". Right now browsers differ but not generating a text node seems reasonable behavior, and we'd be willing to align Firefox with other browsers assuming the spec is updated to be explicit about this.

This came up in https://bugzilla.mozilla.org/show_bug.cgi?id=1855583

cc: @dshin-moz, @tabatkins, @fantasai

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