W3C home > Mailing lists > Public > www-style@w3.org > August 2012

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 30 Aug 2012 16:10:09 +1200
Message-ID: <CAOp6jLZEUg=0QUbi=cMqbNph+vh4kALSmYiHfeFBMr2ASQMApA@mail.gmail.com>
To: Alan Gresley <alan@css-class.com>
Cc: CSS 3 W3C Group <www-style@w3.org>
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.


> 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
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
Received on Thursday, 30 August 2012 04:10:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT