-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-backgrounds] Should we conceive an alternative to background-clip: text
?
#11574
Comments
background-clip: text
?background-clip: text
?
This is currently SVG-only, right? So the direction would be to enable something like this for ordinary text? |
I'm a bit confused by the "text and SVG shapes" wording, but I think it's SVG only now, but the goal of the spec is to generalize it to also apply to CSS boxes somehow. |
I was reading this as the |
I understand this (and all such "text and SVG shapes" occurrences in the Fill & Stroke spec) as referring to HTML text as well as any SVG shapes (including the glyphs in SVG text). See https://drafts.fxtf.org/fill-stroke/#fills, which specifically mentions both "the glyphs of an inline" and "SVG text":
|
OK TBH I had no idea that we had this spec lying around. It might be a solution to this, I'll keep it open to make sure it can do everything |
One thing that |
I made a pitch for "background-video" at one point (#6732) which seems like it might cover some of this through for other live elements there's |
(...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, not very interoperable, and has several issues, for example around accessibility and printing. A big example is #9563.Perhaps it's time to come up with something that allows for the designs that
background-clip: text
allows, but with all those issues thought out?I can envision a few directions:
fill
or something similar to have all the properties ofbackground
, and "fill" the text rather than have it transparent and expose the background.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.background-clip: brush
andcolor: 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.The text was updated successfully, but these errors were encountered: