3.0.1 • Published 7 years ago

postcss-pie v3.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

postcss-pie

NPM version Travis AppVeyor Coverage Status

makes IE capable of rendering 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 PIE, Unpack all the files and deploy them to a directory of the web server, such as /pie/ Configure your postcss

var postcss = require('postcss');
var pie = require('postcss-pie');

postcss([
	pie({
		// You must use absolute address and must have the same domain name as HTML. You must not cross domain or use CDN address.
		htcPath: '/pie/PIE.htc',
		// The path to the directory where other files of PIE is, must be full URL, and can be CDN addresses.
		pieLoadPath: 'http://server.com/pie/',
	});
]);

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. See PIE related documents

PIE documentation