Re: [csswg-drafts] [css-pseudo-4] Other properties that should be included (#5700)

We can't include any properties that affect layout, as they'd reveal precisely how the pseudo-element is nested/split relative to the real elements it crosses.  Only the tree-abiding pseudos can take those. So `border-*` and `padding-*` are both out.

`outline` and `box-decoration-break` don't affect layout, but do still reveal where the pseudo is split, so they're out as well, unfortunately.

(That is, if you had markup like `<span><em>foo b</em><strong>a</strong></span>r`, and you highlighted "bar", how exactly does the element tree look? The ::highlight pseudo clearly has to be split into three pieces, to catch each letter separately. But does it nest inside or the `strong` element? Does the answer change if you highlight just "ar"? There are many questions like this, and working out the full set of answers is terrible drudgework, especially when you have *several* non-tree-abiding pseudo-elements potentially overlapping as well. And if you take the easy way out and say "it always nests as deeply as possible, with a particular specified ordering", then you get results that probably aren't what people would actually expect, like highlighting "foobar" in `fo<em>ob</em>ar` producing three elements rather than one.)

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


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

Received on Saturday, 7 November 2020 01:32:09 UTC