LeaVerou / prefixfree

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

Add a few new keywords and selectors, fix some of the test suite. #6125

Closed pygy closed 7 years ago

pygy commented 7 years ago

This adds support for:

The tests have improved, but they are still broken...

LeaVerou commented 7 years ago

Thanks! See comment. Yeah, the testsuite needs work… :/

pygy commented 7 years ago

Done, and rebased (edit: and rebased again, I had left extra blank lines).

My intuitions about the compressed output were wrong, using null and an additional branch makes the .min.gzipped version slightly smaller. I had to compress by hand using https://closure-compiler.appspot.com/home since the /compile endpoint used by the minify script is silent right now.

LeaVerou commented 7 years ago

Thanks, merged!

Regardless of size, DRY code is easier to maintain and in this case, easier to read. Now I can tell at a glance which selectors need substitution instead of just prefixing.

pygy commented 7 years ago

Agreed, it's a matter of priorities.

For libs like this I tend to favor speed and size down the line (which doubles as speed) over readability and compensate the increased maintenance overhead with tests, but I can totally understand where you're coming from, especially for code that you don't visit often.

coliff commented 7 years ago

in case you hadn't noticed the minified version is currently broken. (no javascript code is in the file).

pygy commented 7 years ago

Oooh my bad, that happened because the closure compiler was not responding, I thought I had left it out... I must have git add -u at some point...

coliff commented 7 years ago

Cool. Are you updating the version number too? It's been on v1.0.7 for a while - even though there have been a number of changes and improvements. It'd be helpful if the version number was bumped.

pygy commented 7 years ago

The bower file is at v1.0.10...

I don't know if the additional selectors/keywords count as bug fixes (1.0.11) or as new features (1.1.0)... I don't know if the changed behavior of fixSelector has to be taken into account (since it is documented as mostly private)... in that case, the is backwards incompatible we'd be up to v2...

LeaVerou commented 7 years ago

No need for v2, this is an undocumented method that's not expected to be used much outside -prefix-free.