In Firefox, a triangle has jagged/aliased edges, whether rotated or not.
CSS (html is just <div></div>
)
div {
border-top: 10px solid rgba(255, 255, 255, 0);
border-right: 70px solid #777;
border-bottom: 10px solid rgba(255, 255, 255, 0);
transform: rotate(90deg);
}
For shapes that fill their box, you can apply outline: 1px solid transparent
.
For unrotated shapes, you can simply apply transform: scale(.999)
(found on SO).
But if I change the last line of CSS to transform: rotate(90deg) scale(.999)
, aliasing still occurs.
This bug, filed back in '12 and still marked as "new," is somewhat related, and no attempt at a solution has been made.
Are there any other hacky workarounds to get smooth rotated triangles in Firefox? Getting rid of the hairline down the middle would be a plus.