padaliyajay/php-autoprefixer
A PHP port of Autoprefixer that adds vendor prefixes to your CSS without Node.js or PostCSS. Write modern properties and let it handle browser compatibility, with support for custom browser lists and working from CSS files or strings.
Architecture fit
postcss/autoprefixer would require spawning a subprocess or shipping a Node toolchain.autoprefixer is normally one line in postcss.config.js. Adopting a PHP reimplementation only makes sense where Node is genuinely unavailable or undesirable: PHP-only CI images, distributed Composer packages that ship CSS, multi-tenant theme compilers that generate CSS at runtime, and HTML email templates (where inlining/prefixing is often done server-side).CssCompiler service, an Artisan command, or a Blade directive) yourself.Integration feasibility
composer require padaliyajay/php-autoprefixer, a static call to compile a CSS string, and a cached result. No daemon, no binary, no platform-specific artifacts — which is a real advantage over anything that shells out.Technical risk
@supports, @media, @layer), CSS custom properties containing semicolons or braces, comments inside declarations, url() data URIs containing ;, CSS nesting, and modern selectors (:is(), :where(), ::backdrop). Failures are usually silent — a dropped rule or a malformed declaration — not a loud exception.browserslist config resolution unless implemented. If your pipeline needs prefixing plus minification, nesting flattening, or postcss-preset-env, this package solves one slice and leaves the rest unaddressed.Key questions
browserslist files, a hardcoded array, or a vendored caniuse snapshot — and how current is that snapshot?@supports, custom properties, and data URIs.)@supports feature queries and ::placeholder-class pseudo-elements correctly?Stack fit
postcss/autoprefixer in a standard Laravel + Vite app. You would be trading a battle-tested Node tool for a smaller PHP one to remove a dependency you already have.Migration path
Compatibility
composer.json constraint rather than assuming).CssPrefixer interface so a future swap to lightningcss/postcss via subprocess, or to a fork, is a one-class change.Sequencing
Maintenance
Support
Scaling
Failure modes
url() values, broken custom properties. Symptom is visual regressions in production, not exceptions.Ramp-up
How can I help you explore Laravel packages today?