How to use scrollbar-style - 1 common examples

To help you get started, we’ve selected a few scrollbar-style examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atom / atom / src / workspace-element.js View on Github external
observeScrollbarStyle() {
    this.subscriptions.add(
      scrollbarStyle.observePreferredScrollbarStyle(style => {
        switch (style) {
          case 'legacy':
            this.classList.remove('scrollbars-visible-when-scrolling');
            this.classList.add('scrollbars-visible-always');
            break;
          case 'overlay':
            this.classList.remove('scrollbars-visible-always');
            this.classList.add('scrollbars-visible-when-scrolling');
            break;
        }
      })
    );
  }

scrollbar-style

This package detects the preferred scroller style for Atom on OS X using the `+preferredScrollerStyle` method on [`NSScroller`][ns-scroller]. For compatibility, this library always returns "legacy" on Windows and Linux.

MIT
Latest version published 4 years ago

Package Health Score

46 / 100
Full package analysis

Popular scrollbar-style functions

Similar packages