I can change the CSS selection color, but how can I get the browser/OS default selection so that I can use it elsewhere?
e.g. on Ubuntu+Chrome text is highl
I think that for what you want is better if you use Javacript combined with CSS.
You could check this post https://stackoverflow.com/a/11752084/8379001 that shows how to find out the os and applies it to CSS.