3D transform functions should be stripped for IE9
See original GitHub issuePer Can I Use, IE9 supports transforms with the -ms
prefix, but not 3D transforms. IE10 supports 3D transforms, but does not use the prefix. Can a “hack” be added to strip all 3D functions (*Z()
and *3d()
) for the -ms
prefixed rule?
Input:
transform:translateX(10px) translateZ(0);
Output:
-webkit-transform:translateX(10px) translateZ(0);
-ms-transform:translateX(10px) translateZ(0); /* invalid and ignored in IE9 */
transform:translateX(10px) translateZ(0);
Expected Output:
-webkit-transform:translateX(10px) translateZ(0);
-ms-transform:translateX(10px);
transform:translateX(10px) translateZ(0);
Issue Analytics
- State:
- Created 10 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
CSS rotate property in IE - internet explorer - Stack Overflow
While it is possible to do transforms in IE8 (and IE6 and IE7) using filter matrix, it rotates around a different point to...
Read more >perspective | CSS-Tricks
The perspective CSS property gives an element a 3D-space by affecting the distance between the Z plane and the user.
Read more >Animation Using CSS Transforms - The Art of Web
How to scale, rotate, translate and transform elements using new CSS hover effects that work now in Safari, Webkit and Chrome.
Read more >"form-" | Can I use... Support tables for HTML5, CSS3, etc
1 Internet Explorer 9 supports 2D but not 3D transforms. In version 9, mixing 2D and 3D transform functions invalidates the entire property....
Read more >Creating Scroll-based Animations using jQuery and CSS3
We want to force hardware acceleration for speed, so a 3D transformation is a must (we will be using translate3d along with other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@EasterPeanut
This is a great solution because translateZ will now be ignored in IE9. But when I try this as input (as fallback for IE9):
I get this same output (-ms-transform property gets removed):
When I try this in the autoprefixer playground, I do get the expected output though; including the -ms-transform. In my project (Webpack project) I am using autoprefixer 6.7.7. Any idea on what could be causing this?
Edit: never mind, already found out! It was the browser list in the package.json that had to be changed.