Custom CSS selection styling

The ::selection CSS pseudo-element allows you to apply styles to your text when it’s highlighted (such as clicking and dragging the mouse across text).

p::selection {
  background: blue;
  color: white;
}