2 ms·
Outline is used for :focus and :focus-visible, so box-shadow is nice to have for hover so you don't have to repurpose the outline for it.
by benatkin 2y ago
Outline is used for :focus and :focus-visible, so box-shadow is nice to have for hover so you don't have to repurpose the outline for it.
- the_other 2y agoit seems to me that :hover and :focus are doing the same job in this case - indicating the target of the next action. I don’t see this as “repurposing”.
- Maken 2y agoIs there any directive against defining an outline for :hover?
- benatkin 2y agoNo, but when tabbing it's often more usable to have the outline look the same across different types of elements, and having a separate focus style from hover style makes it easier.