Forums
View unanswered posts | View active topics It is currently Mon Oct 20, 2014 9:45 pm



Reply to topic  [ 5 posts ] 
 PIE box shadow with CSS expression 
Author Message

Joined: Tue Nov 23, 2010 9:41 am
Posts: 3
Post PIE box shadow with CSS expression
I have a couple of elements to which I've successfully applied a box shadow in IE using PIE. These elements are position: fixed, which works fine in IE7 and above. For IE6 I'm using Microsoft's proprietary CSS expressions to emulate position: fixed.

The problem is that when I scroll the page the contents of the element stay fixed, but their background and shadow scroll with the page.

Is there a know fix for this, or can I somehow apply the CSS expressions to the PIE-generated VML as well?

Thanks in advance.


Tue Nov 23, 2010 9:45 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1444
Post Re: PIE box shadow with CSS expression
I assume you're using the latest dev code if position:fixed is working for you.

I haven't tried it with expressions, though I steer clear of them if at all possible due to the huge performance impact they have. The expression is evaluated pretty much constantly whenever any aspect of the page changes, including just moving the mouse. I'd recommend a javascript solution instead of the expressions for that reason alone.

But regardless, I'm curious why the position isn't automatically synced. Perhaps IE doesn't fire the onmove event when the element's position is changed via the expression? If you want to come up with a testcase and open a ticket in the GitHub issue tracker I can try and look into it when I get a chance.


Tue Nov 23, 2010 10:33 pm
Profile

Joined: Tue Nov 23, 2010 9:41 am
Posts: 3
Post Re: PIE box shadow with CSS expression
Thanks for the reply. I'm using version 1.0b2

I'll look into a Javascript solution for the project I'm currently working on (unfortunately I can't show it publicly). I have however put together a test case which demonstrates the problem. The link is:

http://quis.cc/junk/ie-fixed-shadow-pie/


Wed Nov 24, 2010 4:15 am
Profile

Joined: Tue Nov 23, 2010 9:41 am
Posts: 3
Post Re: PIE box shadow with CSS expression
Update: I can also replicate the issue if I use the following jQuery solution instead of the CSS expressions: https://gist.github.com/713593


Wed Nov 24, 2010 6:48 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1444
Post Re: PIE box shadow with CSS expression
Thanks for the testcase, I think I see what's going wrong and it is indeed a PIE bug. The way it calculates whether an element's position has changed is using getBoundingClientRect, which returns the element position relative to the viewport. Since the expression and the script both keep the element in the same position relative to the viewport, PIE thinks it hasn't moved and doesn't reposition itself.

I've opened issue https://github.com/lojjic/PIE/issues/issue/85 to track this.

Unfortunately I can't see an easy workaround for you at the moment.


Wed Nov 24, 2010 10:03 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.