Open JakobVogelsang opened 2 years ago
We can do this using ./public/css/normalize.css
but this cannot access theme values (colours etc.). So the following does not work:
::-webkit-scrollbar {
width: 5px;
height: 8px;
background-color: var(--mdc-theme-background);
}
::-webkit-scrollbar-thumb {
background: var(--primary);
}
::-webkit-scrollbar-track {
background: var(--mdc-theme-background);
}
With specific colours, it styles the main elements, but anything protected by the shadow DOM is not affected (which is most things, see also here).
Implementing this in src/themes.ts
is ineffective as this is only pulled in the main open-scd
element and so I suspect the shadow DOM is protected from its influence. As plugins are made up of elements with their own shadow DOM, this is probably not a solution.
Material web supports custom theming using CSS custom properties. But these do not extend to scrollbars.
I'm not sure how to progress this at the moment.
This issue is triggered by @danyill originally making a good point that scrolbars should get an extra global styling:
The height of the GOOSE publisher on Chrome is greater than the contained elements.
This gives us a scrollbar on the publisher where we don't need it and a scrollbar on the overall window which is too many scrollbars. They are also the default scrollbars which are intrusive. Perhaps not zero width but less width might be nice.
Probably a CSS change is required which would remove the scrollbars for this case. Perhaps a calc function should be used to subtract the height of the mwc-top-app-bar-fixed element...
Even so, there is the case with more IEDs/GSEControls it will extend.
In this case:
To be very concrete, what I was thinking of was something less visually intrusive, i.e.