-
Notifications
You must be signed in to change notification settings - Fork 20.5k
CSS: Don't cache unrecognized CSS property names #2298
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
Conversation
|
When writing this patch I discovered that we have no tests that our prefixing mechanism works. :O The commit that introduced them didn't add them: |
3e0a2db to
e816e94
Compare
|
BTW, this both fixes the bug & reduces the size by 1 byte. ;) |
|
I found some issues with this patch, marking as WIP. |
e816e94 to
de39b88
Compare
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.
Without this change we'd set node.style.undefined; I added a test for that.
|
Should be ready now. -5 bytes. :) |
de39b88 to
25ca2a4
Compare
|
I added one more test. |
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.
transform is unprefixed in WebKit Nightly but it's prefixed in all Androids < 5 so this should not become a useless test any time soon.
|
LGTM, nice unit test. 😄 |
|
👍 |
This prevents jQuery from caching a prefixed property name if provided directly by the user, e.g. the following code: elem.css( "msTransform", "translate(5px, 2px)" ); should not prevent one from from later setting the transition directly: elem.css( "transform", "translate(5px, 2px)" ); on a browser not understanding the unprefixed version which is the case for Safari 8 & transform. Fixes jquerygh-2015
25ca2a4 to
6da90d9
Compare
|
I'll merge it tomorrow if no one opposes. |
This prevents jQuery from caching a prefixed property name if provided directly by the user, e.g. the following code: elem.css( "msTransform", "translate(5px, 2px)" ); should not prevent one from from later setting the transition directly: elem.css( "transform", "translate(5px, 2px)" ); on a browser not understanding the unprefixed version which is the case for Safari 8 & transform. (cherry-picked from d471842) Fixes gh-2015 Closes gh-2298
This prevents jQuery from caching a prefixed property name if provided directly by the user, e.g. the following code: elem.css( "msTransform", "translate(5px, 2px)" ); should not prevent one from from later setting the transition directly: elem.css( "transform", "translate(5px, 2px)" ); on a browser not understanding the unprefixed version which is the case for Safari 8 & transform. Fixes gh-2015 Closes gh-2298
This prevents jQuery from caching a prefixed property name if provided
directly by the user, e.g. the following code:
should not prevent one from from later setting the transition directly:
on a browser not understanding the unprefixed version which is the case
for Safari 8 & transform.
Fixes gh-2015