This project has moved and is read-only. For the latest updates, please go here.

Bundle Transformer: Autoprefixer

BundleTransformer.Autoprefixer contains one postprocessor-adapter for postprocessing of CSS-code - AutoprefixCssPostProcessor. AutoprefixCssPostProcessor is based on the Andrey Sitnik's Autoprefixer version 7.1.1.

As a JS-engine is used the JavaScript Engine Switcher library. For correct working of this module is recommended to install the following NuGet packages: JavaScriptEngineSwitcher.Msie (only in the ChakraEdgeJsRt mode), JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.ChakraCore. After package is installed and JS-engine is registered, need set a name of JavaScript engine (for example, MsieJsEngine) to the name attribute of /configuration/bundleTransformer/autoprefixer/jsEngine configuration element.

To make AutoprefixCssPostProcessor is one of the default CSS-postprocessors, you need to make changes to the Web.config file. In the defaultPostProcessors attribute of \configuration\bundleTransformer\core\css element must be add AutoprefixCssPostProcessor to end of comma-separated list (for example, defaultPostProcessors="UrlRewritingCssPostProcessor,AutoprefixCssPostProcessor").

Additionally, you can specify the browser conditional expressions in the Web.config file (in the Visual Studio supported IntelliSense):

BundleTransformer.Autoprefixer options in the Web.config file

To clean CSS from any vendor prefixes, you just need to add the one conditional expression is equal to none:

<configuration><bundleTransformer xmlns=""><autoprefixer>
        <add conditionalExpression="none" />

Last edited May 21 at 7:26 PM by Taritsyn, version 56