Re: [csswg-drafts] [css-pseudo-5] ::text / ::text-node pseudoelement (#2208)

> Instead it should be like an invisible p-tag with slightly less specificity than tags that auto opens on text and auto closes before any new block context / when the parent element closes.

This is an interesting idea, especially since the closing tag for `<p>` is already optional. However, there may be some issues with backwards compatibility. If my website uses CSS to add a background color on all `<p>` elements (for example), suddenly my website would have a lot more background color than I intended. Also, `<p>` is a block element, and the text node may not be.

@mauriciogior mentions a new `<text>` element – if we went that route, both the start tag and end tag could be optional.

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


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

Received on Thursday, 20 October 2022 04:53:11 UTC