Forums
View unanswered posts | View active topics It is currently Mon Jul 28, 2014 8:36 pm



Reply to topic  [ 9 posts ] 
 behavior: url(PIE.htc) on every rule? 
Author Message

Joined: Thu Dec 02, 2010 4:12 pm
Posts: 2
Post behavior: url(PIE.htc) on every rule?
So, do I have to use "behavior: url(PIE.htc);" on every rule I create, or can I just add it to the body tag once?


Thu Dec 02, 2010 4:13 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post Re: behavior: url(PIE.htc) on every rule?
Neither, really. It has to be applied to each HTML element that needs CSS3 styles to be rendered, so you can't just apply it to the body. But you don't necessarily have to put it in every single rule either, depending on your CSS structure, as elements are often matched by more than one rule in the cascade. It's common to put the behavior property in a rule with a generic selector, and the individual CSS3 properties in more specific rules.


Thu Dec 02, 2010 4:24 pm
Profile

Joined: Thu Dec 02, 2010 4:12 pm
Posts: 2
Post Re: behavior: url(PIE.htc) on every rule?
sweet. thanks. guess i'll just make a rounded class and define it there.


Thu Dec 02, 2010 5:01 pm
Profile

Joined: Wed Dec 22, 2010 10:16 pm
Posts: 12
Location: Romania
Post Re: behavior: url(PIE.htc) on every rule?
Helloooo !!
i'm new here ...

Jason Thank You So much for this Cool Fix !
i have come across your site before but i wasnt sure what it was and i left ...
today i have more like accidentally came across this Romanian site and got here ...

It is really great to see that you can implement this Fixes intol older browsers :|

Is there any chance you can make a Fix to Enable HTML5 On older browsers also? :D :D


By the way Steve...
i use this To enable the Pie on all my CSS Tags
Code:
*{behavior: url(/IP/PIE.htc);}


Wed Dec 22, 2010 10:47 pm
Profile YIM WWW

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post Re: behavior: url(PIE.htc) on every rule?
Thanks for the kind words!

TheKiller wrote:
i use this To enable the Pie on all my CSS Tags
Code:
*{behavior: url(/IP/PIE.htc);}

I would advise against doing this; this means the behavior logic runs for every element on the page, and there is a performance cost to doing that. While the behavior won't render anything for elements that don't have any CSS3 styles, it still has to add some event listeners and query the element for several styles, which can add up to a noticeable delay if your page has lots of elements. Just be aware of that.


Thu Dec 23, 2010 11:19 am
Profile

Joined: Wed Dec 22, 2010 10:16 pm
Posts: 12
Location: Romania
Post Re: behavior: url(PIE.htc) on every rule?
ahh.. Thanks For letting me know
i will Edit my CSS File after i complete the page ! :)

by the way .. can you please reply me at this?
TheKiller wrote:
Is there any chance you can make a Fix to Enable HTML5 On older browsers also? :D :D


Thu Dec 23, 2010 2:59 pm
Profile YIM WWW

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post Re: behavior: url(PIE.htc) on every rule?
TheKiller wrote:
Is there any chance you can make a Fix to Enable HTML5 On older browsers also? :D :D

PIE's specific goal is to enable CSS3 rendering, so general HTML5 support is outside its scope. However there are plenty of other projects which you can use: https://github.com/Modernizr/Modernizr/ ... -Polyfills


Thu Dec 23, 2010 3:23 pm
Profile

Joined: Wed Dec 22, 2010 10:16 pm
Posts: 12
Location: Romania
Post Re: behavior: url(PIE.htc) on every rule?
jason wrote:
TheKiller wrote:
Is there any chance you can make a Fix to Enable HTML5 On older browsers also? :D :D

PIE's specific goal is to enable CSS3 rendering, so general HTML5 support is outside its scope. However there are plenty of other projects which you can use: https://github.com/Modernizr/Modernizr/ ... -Polyfills

i was aware of that When i have asked ..
but i was proposing you to start a new project to make that happen :)
btw can you please look at my other replys around here?
like this viewtopic.php?f=4&t=339 :?


Fri Dec 24, 2010 1:03 am
Profile YIM WWW

Joined: Thu Aug 05, 2010 12:51 pm
Posts: 12
Post Re: behavior: url(PIE.htc) on every rule?
You definitely don't want to apply pie to every element on the page. That will massively slow down your site. The way I started handling it was to create a single rule that applied pie, like this. Then as I code, just add the items that require pie into that one declaration instead of doing it 20 times in my styles.

Code:
.class1, .class2, #id1, #id2  {behavior: url(/PIE.htc); position: relative;}


Then just write your rules as per normal
Code:
 
.class1 {-moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px;}


On code that has a special pie attribute, like a background gradient, just include the -pie-background attribute in your regular rule.
Code:
#id1 {background: #EEFF99; background: -webkit-gradient(linear, 0 0, 0 bottom, from(#EEFF99), to(#66EE33)); background: -moz-linear-gradient(#EEFF99, #66EE33); background: linear-gradient(#EEFF99, #66EE33); -pie-background: linear-gradient(#EEFF99, #66EE33); }


Wed Jan 12, 2011 1:08 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.