Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS X: Scrollbar is sometimes white-transparent and sometimes black-transparent

I wondered why the scrollbar on Mac OS X is sometimes white-transparent and sometimes black-transparent, if you set "Show scroll bars" to "When scrolling" in the general settings. This happens for all browser (Safari, Chrome, Firefox, Opera).

like image 373
Pipo Avatar asked Jan 16 '14 08:01

Pipo


1 Answers

The reason for this is, that Mac OS X sets the color of the scrollbar dependent on the background-color of your body or (if you haven't set a background-color or use transparent) your html tag.

  • dark background color → white-transparent scrollbar
  • light background color → black-transparent scrollbar

One possible and hacky solution is avoiding setting a background-color and instead use a base64-encoded 1px colored gif as a background-image. gosh

like image 174
Pipo Avatar answered Nov 24 '22 16:11

Pipo