I’ve shared the following CSS tip on Twitter:
You can apply
transform: rotate(0)
to an element’s:focus
state to ensure that the element’s focus outline isn’t concealed by adjacent elements (e.g., the next sibling).
Source: https://mobile.twitter.com/WebPlatformNews/status/1106577402799505414
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.
Fore example, 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.