Hacker News new | ask | show | jobs
by luming 1847 days ago
You should use outline instead of border in your cell css.
2 comments

Why?

I read https://css-tricks.com/almanac/properties/o/outline/ and it says

> The outline property in CSS draws a line around the outside of an element. It’s similar to border except that:

> 1. It always goes around all the sides, you can’t specify particular sides

> 2. It’s not a part of the box model, so it won’t affect the position of the element or adjacent elements (nice for debugging!)

> […]

> It is often used for accessibility reasons, to emphasize a link when tabbed to without affecting positioning and in a different way than hover.

I guess this is why you said outline should be used instead in this case.

And ::focus-within pseudo-class.