::-webkit-scrollbar,
::-webkit-scrollbar-corner {
  width: 17px;
  height: 17px;
  border: 0 solid $divider;
  background-color: rgba($surface, 0.9);
}

::-webkit-scrollbar:horizontal,
::-webkit-scrollbar-corner {
  border-top-width: 1px;
}

::-webkit-scrollbar:vertical,
::-webkit-scrollbar-corner {
  border-left-width: 1px;
}

::-webkit-scrollbar {
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb {
  width: 32px;
  height: 32px;
  border: 4px solid transparent;
  border-radius: 8px;
  background-color: $text-disabled;
  background-clip: padding-box;

  &:horizontal {
    border-top-width: 5px;
    border-top-left-radius: 8px 9px;
    border-top-right-radius: 8px 9px;
  }

  &:vertical {
    border-left-width: 5px;
    border-top-left-radius: 9px 8px;
    border-bottom-left-radius: 9px 8px;
  }

  &:hover { background-color: $text2; }

  &:active { background-color: $text; }

  &:disabled { background-color: $text2-disabled; }
}

//
// Workaround: Chrome does not properly load selection style of GTK theme.
//

::selection {
  background-color: rgba(on(light, primary), 0.24);
}
