- From: Yair Even Or via GitHub <sysbot+gh@w3.org>
- Date: Thu, 08 Jun 2023 14:58:31 +0000
- To: public-css-archive@w3.org
yairEO has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-pseudo] [css-content] add new type of content that clones the text within the node == I suggest a new keyword to be added to the [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content) property which duplicates the `textContent` DOM property, instead of developers having to define the same text twice, when a _pseudo-element_ is needed to have the same text content as its node. I suggest to name it `text`. I was considering `contents` but it might imply it will use `innerHTML` as content, instead of the `textContent` property. ```html <p class='foo'>Hello world</p> ``` ```css .foo { position: relative; } .foo { content: text; position: absolute; z-index: -1; } ``` Such use-uses are very common, to achieve visual effects and what not, for example: https://jsbin.com/livamiwadu/edit?html,css,output where the text has an outer glow using a `filter` property, but the text itself is still crisp. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8938 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 8 June 2023 14:58:33 UTC