Re: [filters] computed value of the 'filter' property

On Wed, Jul 24, 2013 at 1:18 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> On Jul 24, 2013, at 9:47 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> I'm not sure what these sentences have to do with Cameron's
>> suggestions.  If I'm reading him correctly, he's suggesting computing
>> away the percentage.  His description was about primitives where the
>> percentage is relative to a number, but obviously if they were
>> relative to a length or an angle, the result would be a length (in px)
>> or an angle (in deg) (because those are the generally acknowledged
>> "absolute" units).
>
> Implementations seem to disagree with you:
>
> var e = document.getElementsByTagName('body')[0];
> e.style.backgroundImage = "linear-gradient(0.25turn, blue, red )"
> window.getComputedStyle(e).getPropertyValue('background-image')
>
> Blink:
> "linear-gradient(0.25turn, blue, red)"
>
> FF:
> "linear-gradient(0.25turn, rgb(0, 0, 255), rgb(255, 0, 0))"
>
> IE:
> "linear-gradient(0.25turn, blue, red)"
>
> All implementations return 0.25turn instead of 90deg.

The precise unit used isn't that important, so long as its absolute.
But %ages aren't absolute.

> And IIRC you even worked on one of the gradient implementations.

I did parsing and a bit of feature work.  Serialization mostly defers
to existing code, which I didn't write.

~TJ

Received on Wednesday, 24 July 2013 15:41:54 UTC