Re: [csswg-drafts] [css-pseudo][css-shadow-parts] Define "part-like pseudo-element" concept (#10083)

There was also a topic in the conversation about ensuring that *existing* pseudo-elements should be marked as part-like, when they represent something that's *basically* (or actually) a real element under the covers.  Here's the full list of pseudo-elements that are currently defined, according to Bikeshed, and categorized according to my initial impressions:

Clearly should work
----------
* `::after` - it's just a box, you can do whatever to it
* `::before` - ditto
* `::backdrop` - ditto (mostly?)
* `::part()` - duh
* `::slotted()` - also refers to a real element, like an inverted ::part

Probably should work
----------
* `::file-selector-button` - basically just a button, but might restrict its properties somewhat since the *rest* of the element's internals aren't defined

Probably irrelevant and shouldn't work?
----------
* `::view-transition` - all of these live in a separate tree anyway, not part of any actual element (they're more pseudo-elements *of the document*), and when we have scoped VTs, while they'll be originating from some element they're still basically separate
* `::view-transition-group()`
* `::view-transition-image-pair()`
* `::view-transition-new()`
* `::view-transition-old()`

Maybe should work?
--------
* `::placeholder` - defined with limitations so that it's kinda text-like, but in theory it could be just a box inside the input
* `::marker` - some questions to answer about exactly what its layout role is, but in principle it's just as "real" as a `::before`
* `::cue` - this set is all WebVTT stuff. The way they're defined, these are all basically tree-abiding, well-behaved boxes, but the "elements" are generated by WebVTT rather than DOM, and don't meaningfully exist in most ways. Because of this they're limited in what properties they can accept.
* `::cue-region`
* `::cue-region(selector)`
* `::cue(selector)`

Clearly should not work
------------
* `::attr()` - represents an Attr node, not a layout object (just there for doing selectors in contexts where Attr nodes are relevant targets)
* `::first-letter` - all of these are text-ish, which generally aren't tree-abiding
* `::first-line`
* `::grammar-error`
* `::highlight(<custom-highlight-name>)`
* `::postfix`
* `::prefix`
* `::selection`
* `::spelling-error`
* `::target-text`
* `::nth-fragment()` - not quite tree-abiding - it lives in the *box tree*, but doesn't have a virtual existence in the DOM tree. Probably restricted in what properties it can take, etc.

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


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

Received on Thursday, 14 March 2024 21:10:28 UTC