Re: [css4-images] Questions about element()

On 30/08/2012 2:10 PM, Robert O'Callahan wrote:

> On Thu, Aug 30, 2012 at 1:01 AM, Alan Gresley <alan@css-class.com> wrote:
>
>> Question 1: Will it be possible to use background-size for element()?
>>
>> With my first demo [2], I can't do this,
>>
>> #test1 {
>>    background: -moz-element(#image1) 0%, -moz-element(#image1) 0% -50%,
>> white;
>>    background-size: 50px;
>> }
>>
>> but in my second demo [3], I can re-size with background-size and also
>> animate this with a :hover event. Please note that the referenced image is
>> located in a different directory. I may have to do more testing.
>>
>
> Yes, it should respect background-size. I'm not sure exactly what problem
> you're hitting; a simpler testcase would help.


Debugged. Having @keyframes animation breaks background-size on the 
element with the background. Please see this bug demo.

http://css-class.com/test/bugs/gecko/element-keyfarmes-animation-bug.htm

Filed bug report.

https://bugzilla.mozilla.org/show_bug.cgi?id=786943


>> Question 2: Is FF doing something that the spec says is wrong? In my
>> second demo [3], if you hover the referenced element (an image), it
>> transforms by rotating on the z-axis and this show up also in the
>> background for the element that uses element(). This seems to go against
>> what the spec states.
>>
>>    | If the referenced element has a transform applied to
>>    | it or an ancestor, the transform must be ignored
>>    | when rendering the element as an image.
>>    | [[!CSS-TRANSFORMS]]
>>
>
> Correct. Firefox doesn't follow the spec here (partly because that text was
> written long after the Firefox implementation).
>
> Rob


That good. Leads to less abuse of element() but it would be nice to be 
able to rotate backgrounds. Just saying.........


Alan


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/

Received on Thursday, 30 August 2012 07:32:01 UTC