Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDetect "transform-style: preserve-3d" support, or update csstransforms3d for IE10 ? #762
Comments
This comment has been minimized.
This comment has been minimized.
|
+1 for a new test, or at least a new sub-test (e.g. |
This comment has been minimized.
This comment has been minimized.
|
Hmm interesting I had no idea IE10 didn't support that. I think a new test that either hangs off of the existing property, like @stucox mentions above, or just name a new feature detect all together. I'm leaning towards a new test as we can avoid 3.0 is about to drop at any moment and changes how detects a done slightly, we'll hold off until that comes. |
This comment has been minimized.
This comment has been minimized.
angryobject
commented
Apr 15, 2013
|
+1 for this issue. Missing it so much. And the gist mentioned above seem not to work for me - Chrome reports false, while it supports this feature. Although, Firefox reports true as expected. |
This comment has been minimized.
This comment has been minimized.
SilentImp
commented
Apr 20, 2013
(function getPerspective(){
var element = document.createElement('p'),
html = document.getElementsByTagName('HTML')[0],
body = document.getElementsByTagName('BODY')[0],
propertys = {
'webkitTransformStyle':'-webkit-transform-style',
'MozTransformStyle':'-moz-transform-style',
'msTransformStyle':'-ms-transform-style',
'transformStyle':'transform-style'
};
body.insertBefore(element, null);
for (var i in propertys) {
if (element.style[i] !== undefined) {
element.style[i] = "preserve-3d";
}
}
var st = window.getComputedStyle(element, null),
transform = st.getPropertyValue("-webkit-transform-style") ||
st.getPropertyValue("-moz-transform-style") ||
st.getPropertyValue("-ms-transform-style") ||
st.getPropertyValue("transform-style");
if(transform!=='preserve-3d'){
html.className += 'no-preserve-3d';
}
document.body.removeChild(element);
})();May work :) |
This comment has been minimized.
This comment has been minimized.
|
I think we can massively simplify this using the new extensions to define(['Modernizr', 'testAllProps'], function (Modernizr, testAllProps) {
Modernizr.addTest('preserve3d', testAllProps('transformStyle', 'preserve-3d'));
});
(Sorry, this new API hasn't really been publicised yet, we're still working out the details, but essentially the plan is to allow a specific value of a property to be tested, with syntax similar to that above. Property names are still automatically prefixed. It'll use native feature detection where available.) |
This comment has been minimized.
This comment has been minimized.
angryobject
commented
Apr 20, 2013
|
Thanks guys! @SilentImp Yeah, this seems to be working) @stucox Didn't know about this api, thanks! Although, it didn't work for me now, probably because i'm using the version off the main branch, which i took from the site. But i'll look into it, thanks! |
darsain
referenced this issue
May 9, 2013
Closed
IE 10 transform - rotateY doesn't work in the demo #54
edmellum
referenced this issue
Jul 18, 2013
Merged
Add 'transform-style: preserve-3d' test - fixes #762 #999
This comment has been minimized.
This comment has been minimized.
magnusvk
commented
Jul 31, 2013
|
+1. This is really essential to have. |
This comment has been minimized.
This comment has been minimized.
clanam
commented
Jul 31, 2013
|
+1 want... |
This comment has been minimized.
This comment has been minimized.
adam-lynch
commented
Sep 16, 2013
|
+1 |
This comment has been minimized.
This comment has been minimized.
|
there's an open PR that we're waiting on some updates for at #999 |
This comment has been minimized.
This comment has been minimized.
WacesRedky
commented
Sep 20, 2013
|
+1 |
mortnod
referenced this issue
Nov 4, 2013
Closed
Internet Explorer klarer ikke å vise siden skikkelig #4
paulirish
closed this
in
3d7d05e
Nov 6, 2013
added a commit
that referenced
this issue
Nov 6, 2013
DeanMarkTaylor
referenced this issue
Nov 23, 2013
Open
preserve3d broken in Google Chrome on Linux #133
This comment has been minimized.
This comment has been minimized.
gvsmirnov
commented
Nov 24, 2013
|
There is a peculiar case of when the browser reports that it "supports" preserve-3d, but actually doesn't. Reproduces on most linux machines in Google Chrome. The thing is that it does not render preserve-3d on some hardware. See this test case: I do realize that this is likely a bug to be reported to Webkit/Chromium, but it could take ages before it's fixed, and everyone has updated. So a workaround is a good idea. |
This comment has been minimized.
This comment has been minimized.
gvsmirnov
commented
Nov 24, 2013
|
@drygiel @paulirish will you look into this a little? |
This comment has been minimized.
This comment has been minimized.
|
Would you mind opening up a new issue so we don't loose track of your comments? That being said, I am assuming you are hitting places where either chrome doesn't support the GPU, or the GPU is crashing whilst rendering. |
gvsmirnov
referenced this issue
Nov 24, 2013
Closed
Report lack of support of preserve-3d in Chrome if it's disabled thanks to the GPU #1116
This comment has been minimized.
This comment has been minimized.
gvsmirnov
commented
Nov 24, 2013
|
@patrickkettner thanks, there it is: #1116 |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 14, 2014
|
+1 |
This comment has been minimized.
This comment has been minimized.
|
@RogerTheShrubber not sure what you are +1ing here. The original issue was fixed months ago. Could you let me know? Thanks! |
This comment has been minimized.
This comment has been minimized.
ghost
commented
Feb 14, 2014
|
Sorry for the confusion. I'd like to see the preserve-3d test added to Modernizr. It's also a problem in IE11. |
This comment has been minimized.
This comment has been minimized.
|
What does 3d7d05e not fix for you? |
This comment has been minimized.
This comment has been minimized.
pocketjoso
commented
Apr 8, 2014
|
I thought this was fixed, is this a bug, or am I doing something wrong? I'm using Modernizr 2.7.1. |
This comment has been minimized.
This comment has been minimized.
|
@pocketjoso The 2-param syntax for If you like living on the edge, you could try creating a v3.0.0pre Modernizr build at http://v3.modernizr.com/download |
bitinn commentedDec 4, 2012
Didn't find a report for this issue, apologize if dup.
This is a problem because IE10 comes out with strong supports for most transform properties/functions (un-prefixed), but a heart-breaking exception:
It only supports the default 'flat' value, so unlike Opera or IE9, 3d transforms does not fallback gracefully, but animate incorrectly if any part of rules require child rotating relative to parent (e.g. rotate3d on both parent and child).
I am not sure whether updating csstransforms3d (currently only check for perspective support, which IE10 does support) or creating a new test is more appropriate, but this gist seems to be a good starting point:
https://gist.github.com/4123325
reference:
http://msdn.microsoft.com/en-us/library/ie/hh673529%28v=vs.85%29.aspx#the_ms_transform_style_property
http://www.webkit.org/blog-files/3d-transforms/transform-style.html