-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support transition prefix #6
Conversation
I realized that supportedValue in its current form is broken, see cssinjs/jss#354. We might need to rethink this. |
Lets check what others do, for e.g. radium used initially this package as well. |
They switched to |
I'll make another revision after #8 lands. |
|
||
const cache = {} | ||
const transitionProperties = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if transition is unique in this, maybe we need a more general solution for all similar cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where else are we putting property names into a css value?
const transitionProperties = [ | ||
'transition', | ||
'transition-property', | ||
'-webkit-transition', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not also other prefixes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to http://caniuse.com/#feat=css-transitions this covers 99.98% of all browsers used.
- Opera is prefix free since Nov 2012
- Firefox is prefix free since Aug 2012
- IE & Edge never used a prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Now this needs a merge from master |
@cvle any updates? |
I'll update this tomorrow. |
While working on this, I got caught up in incorrect property prefixes. I'm currently enhancing our current test suites to test all property vendor prefixes and fix the issues. |
perfect!
… On 30 Nov 2016, at 16:11, Chi Vinh Le ***@***.***> wrote:
While working on this, I got caught up in incorrect property prefixes. I'm currently enhancing our current test suites to test all property vendor prefixes and fix the issues.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
blocking #11 |
Is there something I need/can do? |
I still need to get #11 done, to have reliable property prefixes which this feature depends on. If you have spare time you can create a PR at the folks at autoprefixer to export the caniuse feature name here https://github.com/postcss/autoprefixer/blob/master/data/prefixes.coffee. Got a nasty food poisoning last week and just got better. Going through piled up work now. Will continue the work here soon too. |
Don't worry its all fine, just wanted to know if I am blocking something. We are in the middle of 3 parallel big things in general, this one, new site and almost finished big core refactoring with flowtype and jss-global. |
@cvle hey, could you explain if |
@AleshaOleg Yes because you need to prefix the properties that are inside the value e.g. it could be |
@AleshaOleg we already handled this one in the other PR, right? can be closed? |
This PR fixes cssinjs/jss#317 and cssinjs/jss#300 by adding support for prefixing properties inside
transition
andtransition-property
.This PR uses a regular expression to match and replace properties with their prefixed version. Tests were added that should pass in browsers needing to prefix the
transform
property: Android stock browsers, UC Browser on Android, Safari IOS 8, and IE9.Note: IE9 doesn't support css transitions, but the tests will pass because the tests only check for correctly prefixing the values.
The test setup is currently not ideal see cssinjs/jss#89. Maybe we should do something like detecting the browser (e.g. using
bowser
) and giving out only relevant tests.