Skip to content
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

translateZ #117

Open
scien opened this issue Mar 5, 2013 · 2 comments
Open

translateZ #117

scien opened this issue Mar 5, 2013 · 2 comments

Comments

@scien
Copy link

scien commented Mar 5, 2013

local updates...

registerCssHook('z', true);
z: function(z) {
  this.set('translate', null, null, z);
},
if (this._translateZ === undefined) { this._translateZ = 0; }
if (z !== null && z !== undefined) { this._translateZ = unit(z, 'px'); }
this.translate = this._translateX + "," + this._translateY + "," + this._translateZ;
re.push(i + "3d(" + this[i] + ")");
elem.style[support.transform] = value.toString(true);

I've seen the note about scaling in chrome, so point 5 here definitely shouldn't go into prod. I just wanted to keep it simple. ideally this should do something smarter with translate vs translate3d.

Just to note: chrome 25 seems to be handling 3d translations just fine. could either use this code and have the true argument only affect scaling, or as in the last paragraph, know when to use translate(x, y) vs translate3d(x, y, z)

Thoughts?

@scien
Copy link
Author

scien commented Mar 5, 2013

note: reason for the request...

Safari 5.0.5 isn't handling z-index correctly inside a transformed element (parent is using scaling, children z-indexes are being ignored). By using translate3d(x, y, z-index), all the layering is correct on Safari 5.0.5.

@scien
Copy link
Author

scien commented Mar 5, 2013

looks like this pull request would resolve this issue
#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant