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

> Having `::text` (as a real node) would also be supremely useful when doing something seemingly simple like hiding text next to an icon. Consider (using Font Awesome):
> 
> ```
> <a href="#"><i class="fa fa-gear"></i> Edit</a>
> ```
> 
> Currently, one must do tricks with `overflow: hidden` and `width` (or several varieties of this hack) to show just the icon. It would be wonderful to just have a rule `a ::text { display: none; }` (or better yet: `i.fa + ::text { display: none; }`

content: none ought to work for this, right? But when we implemented it wasn't web compatible, we'd need a separate keyword 

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


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

Received on Friday, 12 January 2024 13:32:48 UTC