Created
May 22, 2014 09:19
-
-
Save adamcbrewer/cc714b03012b5166bc5d to your computer and use it in GitHub Desktop.
CSS: Fixing Typography Inside of CSS 2D Transforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This should hopefully fix crappy typography inside of rotated elements. | |
Taken from http://flippinawesome.org/2014/05/21/fixing-typography-inside-of-css-2-d-transforms/ */ | |
.rotated-typography { | |
transform: perspective(1px) rotate(-10deg); | |
/* Using `translateZ(0)` forces GPU rendering (and only fixes -webkit), but `perspective(1px)` does the job nicely. */ | |
/* Don't use -ms prefix, however, as Presto engine in IE9 lacks 3D transform support. */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment