Re: [csswg-drafts] [css-pseudo] Add a ::contents pseudo-element (#2406)

I agree `content` makes more sense than `display`. So I guess this option would be:

 - `::contents` gets `content: none` in the UA origin.
 - Like `::marker`, `content: none` and `content: normal` are different on `::contents`.
 - The inheritance of an element is like:
    1. If there is no parent, the initial value
    2. If the `::contents` of the parent has `content: none`, the style of the parent
    3. The style of the `::contents` of the parent

This implies that only the inheritance of `content` is a slightly weird, but `content: inherit` is already broken on Blink.

The example above would be:
```css
#a::contents { content: normal; color: blue }
#b::contents { content: normal; display: block }
```

No need to add a new `content: bikeshed` value. Values different than `normal` and `none` would presumably work like on normal elements, which IIRC was either behaving like `normal` or turning the (pseudo-)element into a replaced image.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2406#issuecomment-2160881983 using your GitHub account


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

Received on Tuesday, 11 June 2024 14:15:52 UTC