CSS3 PIE Forums
http://css3pie.com/forum/

PIE.htc as a single call or per class
http://css3pie.com/forum/viewtopic.php?f=4&t=1675
Page 1 of 1

Author:  mrcycling [ Thu May 24, 2012 12:28 am ]
Post subject:  PIE.htc as a single call or per class

Can the call to behavior: url(PIE.htc) be made in a single statement for all the classes / ids that might use it or does it have to be included within each statement that defines border-radius, box-shadow, etc.

So instead of this:
Code:
#id1, #id2, .class3, .class5 {
   border-radius: ....;
   -moz-border-radius: ....;
   -webkit-border-radius: ....;
   behavior: url(PIE.htc);
}
#id1, #id2, .class4 {
   box-shadow: ....;
   -moz-box-shadow: ....;
   -webkit-box-shadow: ....;
   behavior: url(PIE.htc);
}
.whatever_other_classes { ...


Can we use:
Code:
#id1, #id2, .class3, .class5 {
   border-radius: ....;
   -moz-border-radius: ....;
   -webkit-border-radius: ....;
}
#id1, #id2, .class4 {
   box-shadow: ....;
   -moz-box-shadow: ....;
   -webkit-box-shadow: ....;
}
#id1, #id2, .class3, .class4, .class5, .whatever_other_classes{
   behavior: url(PIE.htc);
}

Author:  jason [ Thu May 24, 2012 9:35 am ]
Post subject:  Re: PIE.htc as a single call or per class

Try it and find out yourself! ;)

(The answer is yes that will work.)

Author:  webaware [ Thu May 24, 2012 4:34 pm ]
Post subject:  Re: PIE.htc as a single call or per class

@mrcycling we build our sites with separate "fixup" stylesheets for the various IE versions using conditional comments, and at the top of the IE7 and IE8 stylesheets we have a list of selectors that need CSS3PIE. After that, we apply any specific fixes we need for that browser. e.g.

Code:
/*   ie8 specific css */

input[type="email"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="text"],
input[type="password"],
input[type="submit"],
textarea,
select,
#add-job-button a,
.fancybutton a,
.wpjb-button,
.wpjb-active,
input.wpjb-active[type="submit"],
body,
#page,
table#wpjb-job-list
{
   behavior: url(/htc/css3pie/PIE.htc);
   position:relative;
}

.fancybutton a,
.wpjb-button,
.wpjb-active,
input.wpjb-active[type="submit"]
{
   -pie-background:linear-gradient(top, #BFBFBF, #585858);
   top:10px;
   margin-left:-1px;
}

.fancybutton a:hover,
.wpjb-button:hover,
.wpjb-active:hover,
input.wpjb-active[type="submit"]:hover
{
   -pie-background:linear-gradient(top, #585858, #BFBFBF);
}
... etc.

Author:  mrcycling [ Thu May 24, 2012 9:09 pm ]
Post subject:  Re: PIE.htc as a single call or per class

Thanks to both for the feedback.

Jason, I did try it, but alas I don't have access to all versions of the IE nightmare to test against, so I took the easy way out and asked to be safe. :oops:

Author:  jason [ Fri May 25, 2012 10:16 am ]
Post subject:  Re: PIE.htc as a single call or per class

Fair enough. :)

"I don't have access to all versions of the IE nightmare to test against"... I do hope that you will be getting that access though. If you're expecting to just drop PIE in and have it "just work" perfectly in all circumstances then you're going to be disappointed, you really do need to test thoroughly in all versions. Luckily there are some good tools available to make this pretty easy, see this forum thread for some good resources: viewtopic.php?f=4&t=1206

Author:  mrcycling [ Fri May 25, 2012 11:27 pm ]
Post subject:  Re: PIE.htc as a single call or per class

Guess I should have said "I don't have easy access to all ....". I take care of only a couple of websites for my business, so don't have the wide array to tools that a web design professional would have, nor the vast expertise.

My "test" method for older IE browsers is to visit some friends who have older computers and see how the websites do. It is not the most efficient method and usually means checking after major changes rather than after every change ... but on the other hand it is a good excuse to share a couple of beers with my buds.

Author:  ttfkam [ Thu Jun 28, 2012 6:13 pm ]
Post subject:  Re: PIE.htc as a single call or per class

mrcycling wrote:
...but alas I don't have access to all versions of the IE nightmare to test against...


This might help: http://utilu.com/IECollection/

It's not perfect, since only truly standalone IE7 acts exactly like IE7, but it'll get you pretty close. And while I’m here…

Multi-Safari
http://michelf.com/projects/multi-safari/

Multi-Firefox
http://www.howtogeek.com/howto/internet ... same-time/

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/