cssinjs / css-vendor

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

Added new plugin for text-decoration-skip-ink property #69

Closed AleshaOleg closed 5 years ago

kof commented 5 years ago

Test failed, is the test wrong or the code?

AleshaOleg commented 5 years ago

@kof actually code is wrong :( I thought -webkit- prefix will work for both cases (Safari and Chrome). But according to autoprefixer, Chrome doesn't need prefix and Safari requires it. Don't know for now how to deal with it

AleshaOleg commented 5 years ago

@kof please check solution.

I decided to detect Safari via appleTrailingWord property. Also can't detect for some reason this property via hasOwnProperty or in. That's why I wrote this line with Object.keys().

screen shot 2019-02-07 at 12 41 02 am
kof commented 5 years ago
'-apple-trailing-word' in document.createElement('p').style

works

kof commented 5 years ago

since you are not detecting safari, you are detecting apple as a vendor, mb better to call it vendor and 'apple' as a value

kof commented 5 years ago

I mean potentially it could be other browser using webkit fork with this apple specific property

AleshaOleg commented 5 years ago

Just pushed updates

AleshaOleg commented 5 years ago

@kof could you please check it again? I pushed required changes