LeaVerou / prefixfree

Break free from CSS prefix hell!
http://projects.verou.me/prefixfree/
MIT License
3.83k stars 712 forks source link

Need a better way to select which stylesheets to process #6137

Open joyously opened 6 years ago

joyously commented 6 years ago

I'm looking for a way to reverse the default of handling all stylesheets except those with data-no-prefix. I would like to be able to ignore all except the ones I mark, without changing too much. This is because I'm using this in an environment where I control only a small part of the total CSS loaded.

LeaVerou commented 6 years ago

There is currently no such way, but I wouldn't oppose a PR for it. I agree that since the need for prefixfree has diminished since it was first written in 2012, this would be a useful addition.

I'd suggest an HTML attribute like "data-prefixfree-opt-in" that can be placed wherever and makes -prefix-free opt-in instead of opt-out. Then, data-prefix on stylesheets to process them.