MurhafSousli / ngx-scrollbar

Custom overlay-scrollbars with native scrolling mechanism
https://ngx-scrollbar.netlify.app/
MIT License
618 stars 99 forks source link

Style variables do not work #606

Closed iMogs370 closed 4 months ago

iMogs370 commented 5 months ago

Here are my styles provided in styles.scss: :root { --scrollbar-thumb-color: rgba(255, 0, 0, 0.2) !important; --scrollbar-track-color: red; }

Element: <ng-scrollbar [orientation]="'vertical'" [visibility]="'native'"> global

Expected Behavior

What behavior were you expecting to see? Track color to go red, thumb to go redish as set in the variables

Actual Behavior

What behavior did you actually see? When inspecting the css in the chrome inspector, the global variables are stricken out and the vars on the element are being used. The scrollbar is in it's default settings/colors.

Environment

MurhafSousli commented 5 months ago

For the time being, you should use the element selector to override the CSS variables, we still need to improve it #591