WebKit supports the convenient CSS initial value, which returns properties to the values ββthey would have if no style was applied to the page.
So, you can reset the values ::-webkit-scrollbar that you selected like this:
.viewDialogLabel::-webkit-scrollbar { width: initial; height: initial; background-color:initial; } .viewDialogLabel::-webkit-scrollbar-track { background-color:initial; width: initial; } .viewDialogLabel::-webkit-scrollbar-track-piece { background-color: initial; } .viewDialogLabel::-webkit-scrollbar-thumb { background-color: initial; width: initial; }
See http://jsfiddle.net/uVGKr/
WebKit also supports the :not() selector , so I would think that the following amendment to your original CSS would prevent custom scrollbars from applying to this table cell:
:not(.viewDialogLabel)::-webkit-scrollbar { width: 6px; height: 6px; background-color:transparent; } :not(.viewDialogLabel)::-webkit-scrollbar-track { background-color:transparent; width: 6px; } :not(.viewDialogLabel)::-webkit-scrollbar-track-piece { background-color: blue; } :not(.viewDialogLabel)::-webkit-scrollbar-thumb { background-color: #d4dee8; width: 6px; }
However, this does not work for me in Chrome 16 - the usual style of scroll styles is applied (see http://jsfiddle.net/uVGKr/1/ ). I'm not sure if Im doing something wrong if you just cannot combine these selectors or if this is a WebKit error.
According to your suggested edit removing td selectors from CSS, this seems to work in Chrome 24 at least: http://jsfiddle.net/uVGKr/2/
Paul D. Waite
source share