CSS Vendor Prefix Tool
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
A PostCSS plugin that automatically parses CSS stylesheets and adds vendor prefixes to CSS rules using values from the Can I Use database, eliminating the need for developers to manually write browser-specific prefixes. With over 22,300 GitHub stars and currently at version 10.5.1, the tool is recommended by Google and used in production at major technology companies. The plugin analyzes each CSS declaration against the Can I Use database, determining which browsers require prefixes for specific properties and values, then adds only the necessary prefixes based on the configured browser targets. For example, it automatically adds -webkit- prefixes for properties like user-select and appearance when targeting Safari or older Chrome versions, and -moz- prefixes for Firefox-specific behaviors. Browserslist configuration drives the prefix decision, allowing teams to specify target browsers through queries like last 2 versions, greater than 1 percent, or specific browser names with version numbers. The tool handles complex scenarios including at-rules like viewport and keyframes, selector prefixes for input-placeholder, property alternatives where syntax differs between vendors, and removing outdated prefixes when target browsers no longer need them. The postcss-preset-env integration provides automatic prefixing for future CSS features alongside polyfilling, while the grid autoprefixer option adds special prefixes for Internet Explorer 10 and 11 Grid layout implementation. The tool works as a PostCSS plugin with zero configuration needed for most projects, integrating seamlessly with Webpack, Vite, Gulp, Grunt, and standalone PostCSS configurations. Source maps are supported for debugging prefixed output back to the original source.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike