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

Set custom styles to ComboBox

3 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Iurii
Top achievements
Rank 1
Iurii asked on 30 Jul 2019, 12:16 PM

Hi,
We use Kendo ComboBox. But it's scrollbar doesn't fit our design.
Is there any API to set custom styles to the scrollbar? It should be cross-browser.
Can you advise a solution?

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 31 Jul 2019, 07:24 AM
Hello, Iurii,

Currently, the scrollbar that is rendered is the default browser one. This is why there is no API method for it, as it is rendered by the browser.

Could you please share more details, on how would you like the style the scrollbar? Is it with CSS or there is a scrollbar component which you would like to add.

This will help us understand the case and advise a possible solution if available.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Iurii
Top achievements
Rank 1
answered on 31 Jul 2019, 09:07 AM
Hi Stefan,

We want to custom css style for scrollbar, this solution we are going to use in Chrome, Mozilla and Edge.
0
Vladimir Iliev
Telerik team
answered on 02 Aug 2019, 09:45 AM
Hello Iurii,

The current state of styling build-in browser scrollbars is very limited. For example Chrome require applying global styles to the body element (cannot be controlled on component level):

body::-webkit-scrollbar {
    width: 1em;
}
body::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
body::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 1px solid slategrey;
}

Firefox allows styling of the color and width of the scrollbar which can be achieved by targeting the `k-list-scroller` CSS class of the `DropDownList` component:

.k-list-scroller {
     scrollbar-width: thin;
}

Regards,
Vladimir Iliev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Iurii
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Iurii
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or