I’ve shared the following CSS tip on Twitter:
You can apply
transform: rotate(0)to an element’s
:focusstate to ensure that the element’s focus outline isn’t concealed by adjacent elements (e.g., the next sibling).
This has lead to a discussion about the different ways to achieve this in CSS. I would like to know what the standard way is to do this in CSS.
position: relative seems “more standard” than
transform: rotate(0) (which is a hack) but we’re not offsetting the element, so it seems like a hack as well.
P.S. This question probably has an obvious answer but I am easily confused when it comes to CSS, so I need to ask.