I noticed the styling of selected text just today while browsing through a news article on The Guardian.
Here are the references:
https://developer.mozilla.org/en-US/docs/Web/CSS/::selection
https://drafts.csswg.org/css-pseudo-4/#highlight-pseudos
It is amazing all of the cool things that you find in CSS - both old and new! We are truly getting a lot for free from the browser these days.