定制 padaliyajay/php-autoprefixer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

padaliyajay/php-autoprefixer

最新稳定版本:1.5

Composer 安装命令:

composer require padaliyajay/php-autoprefixer

包简介

CSS Autoprefixer written in pure PHP.

README 文档

README

CSS autoprefixer written in pure PHP

Installation

Simply add a dependency on padaliyajay/php-autoprefixer to your composer.json file if you use Composer to manage the dependencies of your project:

composer require padaliyajay/php-autoprefixer

Although it's recommended to use Composer, you can actually include these files anyway you want.

Usage

use Padaliyajay\PHPAutoprefixer\Autoprefixer;

$unprefixed_css = file_get_contents('main.css'); // CSS code

$autoprefixer = new Autoprefixer($unprefixed_css);
$prefixed_css = $autoprefixer->compile();

Options

prettyOutput

Example:

$autoprefixer->compile(false); // Output minified CSS

Defines if the prefixed CSS will be a verbose/prettified output. When false the output will be minified. You can pass it as an option to the compile() method.

Default: true

setVendors

Example:

$autoprefixer->setVendors(array(
    // Omit prefixes for IE
    \Padaliyajay\PHPAutoprefixer\Vendor\Webkit::class,
    \Padaliyajay\PHPAutoprefixer\Vendor\Mozilla::class,
    MyNamespace\Custom\Opera::class // Use custom vendor prefixes
));

$autoprefixer->compile();

Define which vendor classes should be used for prefixing. You can omit unwanted vendors like e.g. IE. If used, only the vendor classes in the given array will take effect.

Default:

array(
    \Padaliyajay\PHPAutoprefixer\Vendor\IE::class,
    \Padaliyajay\PHPAutoprefixer\Vendor\Webkit::class,
    \Padaliyajay\PHPAutoprefixer\Vendor\Mozilla::class,
)

License

MIT licensed.

统计信息

  • 总下载量: 7.99M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 47
  • 点击次数: 1
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 46
  • Watchers: 4
  • Forks: 12
  • 开发语言: CSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04