mishal / iless-plugin-autoprefix
ILess plugin for autoprefixing CSS
Installs: 320
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mishal/iless-plugin-autoprefix
Requires
- php: ^5.5 | ^7.0
- mishal/iless: ~2
- symfony/process: ~3
This package is not auto-updated.
Last update: 2025-10-05 12:14:07 UTC
README
Autoprefixes the generated CSS using PostCSS autoprefixer plugin.
Build Status
Requirements
To use this plugin you need node.js > 0.12
installed on the machine.
Installation
Install using composer:
$ composer require mishal/iless-plugin-autoprefix
Install requirements
$ npm install postcss-cli autoprefixer
See package.json
for required versions.
Programmatic Usage
use ILess\Parser;
use ILess\Plugin\Autoprefix\AutoprefixPlugin;
$parser = new Parser();
// register the plugin
$parser->getPluginManager()->addPlugin(new AutoprefixPlugin([
// see https://github.com/ai/browserslist
'browsers' => ['last 2 versions']
]));
$parser->parseFile('/example.less');
$css = $parser->getCSS();
Less Code – Example.less
a {
display: flex;
}
Generated CSS
a {
display: -ms-flexbox;
display: flex;
}