Package Exports
- postcss-pie
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-pie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
postcss-pie
makes IE several of the most useful CSS3 decoration features
postcss-pie is a plugin for PostCSS, use PIE, to makes IE6-IE9 several of the most useful CSS3 decoration features. like:
Usage
- Download the PIE distribution, and unzip it somewhere. sub path from the HTML document domain root. like:
/path/to/pie_files/
- config postcss ```JavaScript var postcss = require('postcss'); var pie = require('postcss-pie');
postcss([
pie({
htcPath: '/path/to/pie_files/PIE.htc',
pieLoadPath: 'http://cdn.server/path/to/js-files/',
});
]);
```
IE requires that HTC behaviors are served up with a content-type header of "text/x-component", otherwise it will simply ignore the behavior. Many web servers are preconfigured to serve the correct content-type, but others are not.
If you have problems with the PIE behavior not being applied, check your server configuration and if possible update it to use the correct content-type. For Apache, you can do this in a .htaccess file:
```
AddType text/x-component .htc
```
Options
Function pie(options) returns new PostCSS plugin. See PostCSS API for plugin usage documentation.
There are 2 options:
htcPath
(string):PIE.htc
file path, file must be in the same domain as the HTML page which uses. path must start with/
. If not use this option,PIE.htc
will not behavior, in this case, you need pie-js way to use.pieLoadPath
(string): parent path ofPIE_IE9.js
andPIE_IE678.js
, must be a full path URL. if empty, parent path ofPIE.htc
will be use. if not usehtcPath
option, this option will disable.