themeable perfect-scrollbar

- added „theme” parameter
- replaced all the CSS visual styles with SCSS variables
- added $ps-theme-default SCSS map that holds all the variables
- added $theme parameter to all the mixins
This commit is contained in:
wujekbogdan
2015-12-09 18:19:02 +01:00
parent 6e32d3ddce
commit eddd2c2731
7 changed files with 212 additions and 124 deletions

View File

@@ -16,5 +16,6 @@ module.exports = {
useKeyboard: true,
useSelectionScroll: false,
wheelPropagation: false,
wheelSpeed: 1
wheelSpeed: 1,
theme: 'default'
};

View File

@@ -26,6 +26,7 @@ module.exports = function (element, userSettings) {
var i = instances.add(element);
i.settings = h.extend(i.settings, userSettings);
cls.add(element, 'ps-theme-' + i.settings.theme);
clickRailHandler(element);
dragScrollbarHandler(element);