Focus states

Unstyled

Focus outline removed

a:focus, button:focus {
    outline: none;
}

Focus and hover

a:focus, button:focus,
a:hover, button:hover {
    background-color: powderblue;
    color: steelblue;
    outline:none;
}

Focus visible

a:focus, button:focus {
    outline: .5em dashed firebrick;
}
a:focus-visible, button:focus-visible {
    outline: .5em dashed deepskyblue;
}

Focus within

ul:focus-within {
    background-color: yellow;
}