[csswg-drafts] [css-backgrounds] Should we fix or build an alternative to `background-clip: text`? (#11574)

noamr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-backgrounds] Should we fix or build an alternative to `background-clip: text`? ==
(...Continuation of an offline conversation with @smfr)

`background-clip: text` is a really cool feature, but it works only in certain scenarios, is under-specified, and has several issues, for example around accessibility and printing. A big example is https://github.com/w3c/csswg-drafts/issues/9563.

Perhaps `background-clip: text` is not the right solution for the problem it tries to solve, and we can come up with something better?

I can envision a few directions:
1. Extending `fill` or something similar to have all the properties of `background`, and "fill" the text rather than have it transparent and expose the background.
2. Extend `mix-blend-mode` or some such to include porter-duff alpha-blending, and also to allow separate mixing to the borders vs. the content. This can be a very powerful way to alpha-blend elements of the design.
3. Introduce something like `background-clip: brush` and `color: brush`, where text or anything else can use the current background as the "color". This can have very creative results but I'm not sure about the complexity.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11574 using your GitHub account


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

Received on Monday, 27 January 2025 11:38:06 UTC