Re: Applying gradients to text

Hmm, I didn't know that that was how most graphic libraries fill text.
Now, that I think about it, it is how to fill text in SVG. Well, SVG
creates the shape and then applies the fill on the inside to the outside.

I do think a stroke property that would only apply to text, like colour,
would be nice. Fill is already taken care of by the colour property. And
the difference between stroke and border could be that stroke surround the
content inside the element where as a border surrounds its box.
Something like margin, border, padding, stroke, content, stroke, padding,
border, margin.

Regards,
Irfan.
On Apr 14, 2013 1:56 AM, "Dirk Schulze" <dschulze@adobe.com> wrote:

>
> On Apr 13, 2013, at 12:08 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
> > On Sat, Apr 13, 2013 at 11:05 AM, irfan mir <theirf@gmail.com> wrote:
> >> Hello,
> >> I am trying to apply a gradient to text using CSS3 Gradients and
> >> background-clip:text;, but it doesn't seem to be working.
> >
> > background-clip:text is a non-standard WebKit feature that will never
> > be part of the real standard, because it's a terrible way to handle
> > the idea of "fill text with an image".
>
> I wouldn't necessarily call it terrible. As a matter of fact, that is what
> most graphics libraries do to fill text. Maybe we should not expose it to
> the web in wider form but push 'fill' and 'stroke' properties on text more.
> A first step would be to bring this up for discussion on the CSS WG and ask
> to proceed with using these properties on text.
>
> Greetings,
> Dirk
>
>
> >
> > However, if you're applying this to individual spans, rather than to a
> > block element containing text, that's probably your issue - a lot of
> > the spans will probably be small enough that only a fraction of your
> > 100x100 background-size will cover them.
> >
> > ~TJ
> >
>
>

Received on Sunday, 14 April 2013 06:36:33 UTC