Skip to content

Theme-based scrollbar background colors and sizes are hardcoded in SCSS #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stefcameron opened this issue Nov 11, 2020 · 0 comments · Fixed by #1484
Closed

Theme-based scrollbar background colors and sizes are hardcoded in SCSS #1337

stefcameron opened this issue Nov 11, 2020 · 0 comments · Fixed by #1484
Assignees
Labels
enhancement New feature or request

Comments

@stefcameron
Copy link
Contributor

If an extension needs scrollbars, there is currently no way for it to get the proper colors and sizes because they are hardcoded in SCSS, see

@mixin custom-scrollbar($theme: light, $size: 7px, $borderSpacing: 5px) {
$themes: (
light: #5f6064,
dark: #bbb,
);
$scrollBarColor: if(map_has_key($themes, $theme), map_get($themes, $theme), none);
$scrollBarSize: calc(#{$size} + #{$borderSpacing} * 2);

@mixin custom-scrollbar($theme: light, $size: 7px, $borderSpacing: 5px) {
  $themes: (
    light: #5f6064,
    dark: #bbb,
  );

  $scrollBarColor: if(map_has_key($themes, $theme), map_get($themes, $theme), none);
  $scrollBarSize: calc(#{$size} + #{$borderSpacing} * 2);

The light and dark colors, as well as default size and border width, should be provided as themed CSS Variables:

--scrollbarBackground: <color>;
--scrollbarSize: 7px;
--scrollbarBorderWidth: 5px;

Please remember to add these to the color reference in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants