Timothy Kempf, a web developer and designer in California.Blog
Created at
aliasing-fix.md

Eliminating aliasing for elements with 3D rotation applied

Sometimes, when you apply a 3D rotation to an element within a perspective parent, it will have aliased edges.

image

This can be fixed by adding outline: 1px solid transparent to the element with the transform:

.rotatedElement {
  transform: rotateY(5deg) rotateX(5deg);
  outline: 1px solid transparent;
}
image
Generated from GitHub Gist 8a6d8e5f6da027f8cf2cfaa02460120e