cssinjs / css-vendor

Runtime vendor prefixing based on feature detection.
MIT License
67 stars 24 forks source link

Fix failing tests Part 1 #14

Closed cvle closed 7 years ago

cvle commented 7 years ago

This PR introduces a plugin architecture and adds support for old mask-border syntax and old logical props syntax.

Reduces failing tests down to 149 :-)

kof commented 7 years ago

Nice, the only question I have is: how old are the browsers we are trying to support here and should we support them by default or rather not, but allow it optionally. The reason is that we might make the overhead for 90% who don't need it.

kof commented 7 years ago

I would rather want to get 90% with minimal overhead by default (fast by default), because we are operating at runtime.

cvle commented 7 years ago

I was thinking about that too. But then again css-vendor is really fast by design. We have a cache prefill, other properties are calculated only once and string comparisons are extremely cheap. I would aim for full autoprefixer compliance for now and think about optimizations later.

By the way, the prefixes included in this PR is still valid for modern browsers, the question is just who uses these properties.

kof commented 7 years ago

So who uses them? I am thinking about dynamic value functions and a new hook which will react on value change. So potentially, value prefixing needs to be very very fast.

kof commented 7 years ago

Also I am thinking of an Observable support which will allow to animate values. So the question will be is the value vendor prefixing fast enought to not cause any overhead when you animate some value?

cvle commented 7 years ago

So far whether or not a property needs a prefix is determined once. All further queries are delivered from cache. So this should be really fast.

kof commented 7 years ago

ok then lets keep it that way for now, until we have some benchmarks

kof commented 7 years ago

merged