Skip to content
Newer
Older
100644 130 lines (106 sloc) 6.88 KB
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
1 <!DOCTYPE html>
2 <html>
3 <head>
4
5 <meta content="text/html; charset=UTF-8" http-equiv="content-type">
6 <title>PIE Documentation: Q &amp; A</title>
7
8 </head>
9 <body>
10
11 <h1>Q &amp; A</h1>
12
13
14 <!-- noformat on -->
15
16 <h2>What is PIE?</h2>
17 <p>PIE is a utility for Internet Explorer (currently versions 6-8) which gives it the ability to parse
18 and render a number of the most useful CSS3 properties.</p>
19
20
21 <h2>How does it work?</h2>
22 <p>PIE is implemented as an attached behavior; in your CSS, you simply specify:</p>
23 <pre><code>behavior: url(PIE.htc);</code></pre>
24 <p>Once the behavior is attached, it looks for any of the supported CSS3 properties which might be attached to the
25 target element, parses those properties, and renders them on the page.</p>
26
27
28 <h2>What CSS3 properties are currently supported?</h2>
67094db Site documentation updates to get up to date with beta5 release
Jason Johnston authored Sep 7, 2011
29 <p>PIE currently adds full or partial support in IE 6-8 for:</p>
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
30 <ul>
31 <li>border-radius</li>
32 <li>box-shadow</li>
33 <li>border-image</li>
34 <li>multiple background images</li>
35 <li>linear-gradient background images</li>
36 </ul>
67094db Site documentation updates to get up to date with beta5 release
Jason Johnston authored Sep 8, 2011
37
38 <p>In addition, PIE adds support for border-image and linear-gradient to IE 9, which already supports the other features natively.</p>
39
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
40 <p>You can find detailed information about the levels of support in the
41 <a href="/documentation/supported-css3-features/">Supported CSS3 Properties and Values</a> documentation.</p>
42
43
44 <h2>How large is it?</h2>
67094db Site documentation updates to get up to date with beta5 release
Jason Johnston authored Sep 8, 2011
45 <p>The .htc behavior file is 40K. With gzip compression, it is 16K. (You do gzip your content, right?)</p>
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
46 <p>It's pretty easy to save at least as much as that by using CSS3 instead of all the extra images, markup, and CSS
47 you'd have to use otherwise, so this is usually a net win in terms of total page weight. Also, it's important to
48 note that the behavior file is only downloaded by IE, so in other browsers which support these CSS3 features natively,
49 that's pure win.</p>
67094db Site documentation updates to get up to date with beta5 release
Jason Johnston authored Sep 8, 2011
50 <p>Improvements to file size, by making features optional, are planned in a future release.</p>
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
51
52
53 <h2>What are the goals of the project?</h2>
54 <p>Even though today's advanced browsers are starting to implement decent levels of CSS3 support, it will still be
55 years before Web authors can start using these CSS3 features in widespread deployment. The main reason is, of course,
56 that Internet Explorer does not yet implement any of these features, has a majority market share, and has a notoriously
57 slow upgrade cycle among its users. IE9 promises to start implementing some CSS3, but like it or not it will still
58 likely be years before IE8 and below shrink to a negligible percentage of users.</p>
59 <p>PIE aims to drastically shorten that timeframe, by implementing a simple shim to make CSS3 "just work" in IE. Our
60 goals are:</p>
61 <ol>
62 <li>
63 <h3>Be simple to use</h3>
64 <p>Applying PIE is extremely simple; in many cases the only thing you have to do is add the behavior property
65 to your CSS.</p>
66 </li>
67 <li>
68 <h3>Be a CSS-only solution</h3>
69 <p>Many of the current solutions for implementing CSS3 features like border-radius are implemented as
70 JavaScript libraries and require the author to write JavaScript to invoke them. That is less than ideal
71 because it requires the CSS author to also know how to write JS, and it makes development slower and less
72 maintainable because your styling code is scattered between CSS and JS files. PIE works entirely within the
73 stylesheet, so you only write CSS and it's all in a single place.</p>
74 </li>
75 <li>
76 <h3>Be seamless to the CSS author</h3>
77 <p>There have been several articles and resources in recent months which show ways that you can make IE
78 "mimic" certain CSS3 features, for example using IE filters to fake box-shadow, or jQuery plugins to implement
79 rounded corners. The problem with these solutions is that they require a lot of IE-specific code on top of your
80 real CSS3, increasing your development time and the size of your CSS files. PIE on the other hand uses your
81 CSS3 directly whenever possible; you simply write real CSS3, and PIE handles it seamlessly.</p>
82 <p>PIE handles attaching, detaching, and updating automatically without any intervention from the author. This
83 means that, unlike some other solutions, PIE does not require you to explicitly initialize elements when they
84 are added to or removed from the document via script, and does not require any sort of "update" method to be
85 called when an element's position, size, or styles are modified on the fly.</p>
86 <p>Another aspect of PIE's seamlessness is that it should be fully compatible with any JavaScript library the
87 site author might choose to use. You can create elements and assign CSS3 styles to them in jQuery or YUI or
88 MooTools or any other library and PIE will automatically apply itself. Also, PIE's objects are completely
89 self-contained except for a single global <code>PIE</code> object, so there's no chance that it will
90 override objects or functions from any other JS code.</p>
91 </li>
92 <li>
93 <h3>Be as compliant with the CSS3 specs as possible</h3>
94 <p>PIE aims to be a true CSS3 implementation for those features it supports, complying with the current spec
95 drafts as closely as possible. The goal is to allow authors to write a single set of CSS3 code and have it
96 "just work" between browsers.</p>
97 </li>
98 <li>
99 <h3>Be as performant as possible</h3>
100 <p>If it makes the browser feel sluggish (more so than IE normally does, that is) then it's useless. PIE was
101 architected with performance in mind from the very beginning:</p>
102 <ul>
103 <li>Rendering elements are only updated when they need to be.</li>
104 <li>CSS property values are only parsed when they have changed.</li>
105 <li>Internal objects are created lazily, and cached when appropriate.</li>
106 <li>The behavior script is written with file size in mind, and the most advanced JS compression tools
107 available are used to minimize the file size, so the initial download is as fast as possible.</li>
108 </ul>
109 </li>
110 </ol>
111
112
113 <h2>What sites have used PIE?</h2>
67094db Site documentation updates to get up to date with beta5 release
Jason Johnston authored Sep 8, 2011
114 <p>See our <a href="/demos">Demos and Example Sites</a> page for a list of some live public sites using PIE.</p>
ee110db Documentation updates to sync with site and recent changes
Jason Johnston authored Dec 5, 2010
115
116
117 <h2>What are the licensing terms?</h2>
118 <p>PIE is licensed under a <a href="http://github.com/lojjic/PIE/blob/master/LICENSE">dual license of Apache License
119 Version 2.0 and General Public License (GPL) Version 2</a>.</p>
120 <p>While you are welcome to use PIE free of charge, we do ask that you consider making a donation as you are able.
121 Development of PIE happens almost exclusively during "free time" on evenings and weekends, so your donations are
122 important to help keep this going. Think of the hours of costly, frustrating cross-browser hacking that PIE is saving
123 you; if you can donate a small proportion of that it will be greatly appreciated!</p>
124
125 <!-- noformat off -->
126
127
128
129 </body>
130 </html>
Something went wrong with that request. Please try again.