prefixfree
Break free from CSS prefix hell!
Prefix-free is a JavaScript library that solves a problem from an earlier era of web development. When browsers were implementing newer CSS features, they often required developers to write the same property multiple times with different browser-specific prefixes, such as -webkit-, -moz-, and -ms-, before also writing the standard unprefixed version. This meant that a single CSS rule might need to be repeated three or four times just to work across browsers.
Prefix-free removes that burden. You include a single script tag on the page, write your CSS using only the standard property names without any prefixes, and the library handles the rest. When a visitor loads the page, the script detects which browser they are using, figures out which prefix that browser requires for each property, and rewrites the CSS in the background before the page renders. The developer writes clean, concise CSS once; the library handles browser-specific translation automatically.
The library works with CSS in link elements, style elements, and inline style attributes. It also exposes a small API, called StyleFix, that lets plugin authors register their own CSS transformation functions to run alongside the built-in prefix handling.
This library was created by Lea Verou, who is well known in the web standards community. It addressed a genuine pain point during a specific period when browser vendors were implementing experimental CSS features under vendor prefixes. Modern browsers have largely dropped the need for these prefixes on most properties, so the problem prefix-free solved is less pressing today than it was at the time of the project.
The project is hosted on GitHub and the README is brief, mostly covering the internal API for plugin authors.