This is a migrated thread and some comments may be shown as answers.

Decorated scrollbars across browsers

4 Answers 91 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Martin Roussel
Top achievements
Rank 1
Martin Roussel asked on 27 Dec 2012, 08:01 PM
Hi, I was testing the RadFormDecorator in different web browsers and noticed some differences, especially with the scrollbars in RadComboBoxes and RadSplitters. Im using Q3 2012 with WebBlue skin.

<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" Skin="WebBlue" DecoratedControls="All" EnableRoundedCorners="false"  />

In IE8 and IE9, the scrollers are like I want. Decorated with a darkish blue (ie8.png).

In Chrome (23.0.1271.97 m) and Safari 5.1.7 (PC), scrollers are decorated but differently. The filling color is alot lighter and is more grey than blue (chrome-safari.png). The color actually makes it hard to see when using grey background

In FF (17.0.1) and Opera 12.11, scrollers are not decorated at all. Ive read somewhere that FF wont allow scroll decoration and probably it's the same for Opera.

What's bugging the most is the style difference when decoration is allowed. Is this normal and is there a CSS workaround for Chrome/Safari to make it look like the ones in IE?

TIA


Martin

4 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 28 Dec 2012, 03:05 PM
Hello Martin,

According to the W3C standards, scrollbars are not part of the website but the browser. Therefore they are not supposed to be decorated, although some browsers (e.g. IE9 and WebKit) are an exception.

The difference of the styling of the scrollbars (we use the same color for the track for both browsers - #c7d0d9 for WebBlue skin ) between IE9 and WebKit (Chrome and Safari) is due to the difference in the styling attributes these browsers are applying. Therefore the observed behaviour is not a bug but a browser behaviour. You can, however, overwrite the WebKit's CSS classes and apply the desired color of the scrollbar, following the approach below:
.RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar,
 .RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar-thumb:vertical,
 .RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar-thumb:horizontal,
 .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar, .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar-thumb:vertical,
 .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar-thumb:horizontal form::-webkit-scrollbar,
 .RadForm_WebBlue.rfdScrollBars form::-webkit-scrollbar-thumb:vertical,
 .RadForm_WebBlue.rfdScrollBars form::-webkit-scrollbar-thumb:horizontal
{
    background-color: red !important; /* choose your color */
}


Kind regards,
Danail Vasilev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0
Martin Roussel
Top achievements
Rank 1
answered on 02 Jan 2013, 07:56 PM
Danail,

that seems to do the trick for webkit browsers except for horizontal scroller of RadComboBoxes. For other controls, like RadSplitter, it is good. Seems like there a CSS entry we need to add to apply the same rule but cant see which one we miss.

TIA

Martin
0
Danail Vasilev
Telerik team
answered on 07 Jan 2013, 10:46 AM
Hello Martin,

The following CSS should do the work:
<style>
    .RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar,
    .RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar-thumb:vertical,
    .RadForm_WebBlue.rfdScrollBars body::-webkit-scrollbar-thumb:horizontal,
    .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar,
    .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar-thumb:vertical,
    .RadForm_WebBlue.rfdScrollBars div::-webkit-scrollbar-thumb:horizontal,
    .RadForm_WebBlue.rfdScrollBars form::-webkit-scrollbar-thumb:vertical,
    .RadForm_WebBlue.rfdScrollBars form::-webkit-scrollbar-thumb:horizontal
    {
        background-color: red !important; /* choose your color */
    }
</style>

I hope that helps.

Regards,
Danail Vasilev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0
Martin Roussel
Top achievements
Rank 1
answered on 07 Jan 2013, 12:04 PM
thanks, it seems to be the right one indeed.

Martin
Tags
FormDecorator
Asked by
Martin Roussel
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Martin Roussel
Top achievements
Rank 1
Share this question
or