I am making up a webpage in which react-ace editor takes up 50% of the page's width and 90% of page's height. After the editor has a vertical scroller on writing some code, I want to style the default vertical scroller shown.
I can get the instance of the editor using -
const reactAceComponent = this.refs.reactAceComponent;
const editor = reactAceComponent.editor;
by putting reactAceComponent ref on Editor.
And after that I am able to change Scroller height and width etc. But how do I style the Scroller itself?
Suppose I want to give the scroller a class "style-scroller" and do something like this :
#style-scroller::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #F5F5F5;
border-radius: 10px;
}
#style-scroller::-webkit-scrollbar
{
width: 10px;
background-color: #F5F5F5;
}
#style-scroller::-webkit-scrollbar-thumb
{
background-color: #3366FF;
border-radius: 10px;
background-image: -webkit-linear-gradient(0deg,
rgba(255, 255, 255, 0.5) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.5) 50%,
rgba(255, 255, 255, 0.5) 75%,
transparent 75%,
transparent)
}
Is it possible to give custom styling to scroller? Where do I even start? Please help me.