-
Notifications
You must be signed in to change notification settings - Fork 19
Autoprefixer
BundleTransformer.Autoprefixer contains one postprocessor-adapter for postprocessing of CSS code - AutoprefixCssPostProcessor
.
This adapter makes actualization of vendor prefixes in CSS code by using the Autoprefixer Host for .NET version 3.0.36 (supports the Andrey Sitnik's Autoprefixer version 10.4.20.0).
As a JS engine is used the JavaScript Engine Switcher library. For correct working of this module, you need to install one of the following NuGet packages:
- JavaScriptEngineSwitcher.ChakraCore
- JavaScriptEngineSwitcher.Jint
- JavaScriptEngineSwitcher.Msie (only in the Chakra JsRT modes)
- JavaScriptEngineSwitcher.V8
After package is installed and JS engine is registered, need set a name of JS engine (for example, MsieJsEngine
) to the name
attribute of /configuration/bundleTransformer/autoprefixer/jsEngine
configuration element in the Web.config
file.
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):
To clean CSS from any vendor prefixes, you just need to add the one conditional expression is equal to none
:
<configuration>
…
<bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
…
<autoprefixer>
<browsers>
<add conditionalExpression="none" />
</browsers>
…
</autoprefixer>
…
</bundleTransformer>
…
</configuration>