[csswg-drafts] [css-content-3] `content: none` does not work as universally as the spec claims it does. (#12998)

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

== [css-content-3] `content: none` does not work as universally as the spec claims it does. ==
Currently, the [none](https://drafts.csswg.org/css-content/#valdef-content-none) value of the [content]() property says that:
> On [pseudo-elements](https://www.w3.org/TR/CSS2/selector.html#x22) it inhibits the creation of the pseudo-element as if it had [display: none](https://drafts.csswg.org/css-display-4/#propdef-display).

This is not respected universally in all three major browsers for all pseudo-elements. For example:
```html
<!DOCTYPE html>
<style>
    dialog::backdrop {
        background-color: green;
        content: none;
    }
</style>
<dialog id="dialog"></dialog>
<script>
    dialog.showModal();
</script>
```
The green backdrop is visible in Firefox, Chrome and Safari.
I don't have time to test all the other pseudo-elements, but I'd assume that this is not just a problem with `::backdrop`.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 21 October 2025 16:29:37 UTC