Re: [csswg-drafts] [css-display][css-pseudo] Clearly define display: contents behaviour on pseudo-elements (#6518)

I had a discussion with @emilio, and it sounds like everything is well defined in https://drafts.csswg.org/css-pseudo/, just in obscure ways:

* Typographic Pseudo-elements
* Highlight Pseudo-elements

display does not apply. Similar to inline level boxes.

* ::before / ::after

> These pseudo-elements can be styled exactly like any normal document-sourced element in the document tree; all properties that apply to a normal element likewise apply to ::before and ::after.

* ::marker

> Only a limited set of properties can be used on the ::marker pseudo-element. This list is defined in CSS Lists 3 ยง 3.1.1 Properties Applying to ::marker.

e.g. display does not apply atm.

* ::placeholder

> All properties that apply to the ::first-line pseudo-element also apply to the ::placeholder pseudo-element.

e.g. display does not apply to ::placeholder, so display: contents does nothing.

* ::file-selector-button

> The ::file-selector-button pseudo-element targets the <button> inside an <input> element with type=file, if the UA renders such a button.
> There is no restriction on which properties apply to the ::file-selector-button pseudo-element.

I assume that means this should just work like it does on <button>

---

That being said, one thing that would be nice to clarify would be the computed values, meaning the initial values when `display` doesn't apply. 


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


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

Received on Saturday, 14 August 2021 08:52:07 UTC