Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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