2

I would like to try using .htc files or PIE to emulate some CSS3 behaviors in older IE browsers.

  1. When is it not a good idea? why not?

  2. Is there some other better alternative to do the same thing?

  3. Are there IE version specific issues I should be aware of?

    I know the performance degrades as you add more objects, but I am thinking about just trying it out on a simple page with gradients and shadows for starters. I want to move on to CSS3, but I can't see abandoning all of the corporate employees who have no choice of browsers. I want to keep the site the same as much as is possible across browsers. Please provide factual reasons for any opinions.

Community
  • 1
  • 1
Sinthia V
  • 2,103
  • 2
  • 18
  • 36
  • 1
    `.htc` polyfills are a good idea if 1. they satisfy the requirements of your use case; and 1a. they satisfy the "performance" requirement of your use case. – millimoose Oct 23 '11 at 19:05
  • What kind of performance hit are we talking about vs. end cap graphics? – Sinthia V Oct 23 '11 at 19:34

1 Answers1

1

If you are going to add CSS3 behaviors to older IE browsers, you really do not have any choice but to use shims like PIE. Whether it is good practice or not really doesn't apply. The question really is, "can I do it?"

I'm currently using PIE for the same reasons you are. It works very well for features that it supports. There is one thing to watch out for. On my site I'm primarily using PIE for rounded corners and gradient backgrounds. Probably 60% of content is generated via templates. So containers holding the generated html can vary greatly in size as dynamic content is being created. PIE doesn't seem to render this situation reliably on IE8 (haven't tested with IE6/7). It works correctly 50 to 90% of time, but I cannot get to 100%. For the pages with static html content, PIE works excellently.

So for a "normal" web page, I'd go with PIE.

In general, for CSS3/HTML5 support, take a look at http://www.modernizr.com/

photo_tom
  • 7,292
  • 14
  • 68
  • 116
  • I have a similar problem. I want to replace some weird conditionals to decide what end cap to use for my rounded corners. I think it will work. – Sinthia V Oct 23 '11 at 19:31
  • The PIE's generated corners look really great. Exactly same as in FF/Chrome/IE9 – photo_tom Oct 23 '11 at 19:47
  • I just took a look at modernizr. Their [list of "shims"](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills) is awesome! – Sinthia V Oct 23 '11 at 23:12