JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q35938F
  • License MIT

makes IE several of the most useful CSS3 decoration features

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

Build Status NPM version Coverage Status

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

  1. Download the PIE distribution, and unzip it somewhere. sub path from the HTML document domain root. like: /path/to/pie_files/
  2. 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/',
    });
]);
```
  1. Serving the correct Content-Type
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 of PIE_IE9.js and PIE_IE678.js, must be a full path URL. if empty, parent path of PIE.htc will be use. if not use htcPath option, this option will disable.

PIE documentation