// Lightning Design System 2.264.0-beta.1
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

@mixin scrollbar($size: 10px, $thumb: var(--slds-g-color-neutral-base-95, #{$color-background-scrollbar}), $track: var(--slds-g-color-neutral-base-80, #{$color-background-scrollbar-track})) {

  &::-webkit-scrollbar {
    width: $size;
    height: $size;

    &:window-inactive {
      opacity: 0;
    }
  }

  &::-webkit-scrollbar-thumb {
    background: $thumb;
    border-radius: $border-radius-large;
    box-shadow: $track 0 0 0 $border-width-thin inset;
  }

  &::-webkit-scrollbar-track {
    background: $track;
  }
}

/// Enable momentum scrolling in Mobile Safari (iOS)
/// Side effect: hides scrollbars for this browser
///
/// Fixes a bug where some zones were not scrollable:
/// https://github.com/salesforce-ux/design-system/issues/81
@mixin enable-ios-momentum-scrolling {
  -webkit-overflow-scrolling: touch;
}
