Jagged Edges on CSS Translated + Rotated Button

Background Hi everyone, not sure how to fix this with CSS but it seems translated and rotated buttons still have a "jagged" edge which means there isnt any or enough anti-aliasing done. Using edge/chromium (technically webview2 on windows) Attempts to fix I've tried following this stack overflow https://stackoverflow.com/questions/6492027/css-transform-jagged-edges-in-chrome and also searched for the issue in this discord which seems similar to what is in the stackoverflow post which was the transparent outline to force antialiasing. Reproduction https://play.tailwindcss.com/1EL2GoMiXi Thanks again :)
Tailwind Play
Tailwind Play
An advanced online playground for Tailwind CSS that lets you use all of Tailwind's build-time features directly in the browser.
No description
9 Replies
ἔρως
ἔρως2mo ago
you can't, that's how pixels work you can try to add a box-shadow to the button, like this: box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.5); by the way, don't remove the outline of buttons
Xelus
Xelus2mo ago
surprised there isnt more aliasing going on then (removed the outline-none from here)
No description
Xelus
Xelus2mo ago
with the suggested shadow
No description
ἔρως
ἔρως2mo ago
you can try to reduce the spread or play around with the shadow but that's the best you will get
Xelus
Xelus2mo ago
ok thank you
ἔρως
ἔρως2mo ago
you're welcome by the way, if you want, you can also try translate3D(30px, 30px, 0px) it helps a little
ἔρως
ἔρως2mo ago
just a little
No description
Xelus
Xelus2mo ago
ah ok thanks will take a look
ἔρως
ἔρως2mo ago
you're welcome
Want results from more Discord servers?
Add your server