Hi Brian,
that works but it's pretty ugly.
It seems like overkill to force a concept like premultiplied alpha on the
user just to get 'transparent' to do what you expect.
If current behavior was already discussed and now implemented, it's
probably not worth changing at this point.
Rik
On Tue, Feb 21, 2012 at 11:09 AM, Brian Manthos <brianman@microsoft.com>wrote:
> Rik Cabanier:
> > However by forcing premultiplied space, you can no longer go from
> 'yellow'
> > to 'transparent red' because the 'red' value is removed when you multiply
> > by 0.
>
> Note that you can approximate the desired effect using a 3rd stop.
>
> linear-gradient(yellow, rgba(255,0,0,0.1) 90%, transparent)
>
> I expect most browsers will not treat "0.1" as "near zero, treat as zero",
> as such this should work reliably.
>
>
> If you want a better approximation, you'll need to use tighter numbers
> which might compromise reliability across implementations because "close
> enough to zero to treat as zero" is not officially defined:
>
> linear-gradient(yellow, rgba(255,0,0,0.001) 99.9%, transparent)
>