-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Mar 24, 2022
1 parent
13f617c
commit 37ef155
Showing
33 changed files
with
269 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
The MIT License (MIT) Copyright (c) 2016 Hyunje Alex Jun and other contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>perfect-scrollbar example</title> | ||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet"> | ||
<script src="../dist/js/perfect-scrollbar.js"></script> | ||
<style> | ||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; } | ||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; } | ||
</style> | ||
</head> | ||
<body> | ||
<div id="Default" class="contentHolder"> | ||
<div class="content"> | ||
</div> | ||
</div> | ||
<script> | ||
var $ = document.querySelector.bind(document); | ||
window.onload = function () { | ||
Ps.initialize($('#Default'), { | ||
theme: 'big-and-ugly' | ||
}); | ||
}; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
/* Copyright (c) 2015 Hyunje Alex Jun and other contributors | ||
* Licensed under the MIT License | ||
*/ | ||
'use strict'; | ||
|
||
module.exports = require('./src/js/main'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
/* Copyright (c) 2015 Hyunje Alex Jun and other contributors | ||
* Licensed under the MIT License | ||
*/ | ||
'use strict'; | ||
|
||
module.exports = require('./src/js/adaptor/jquery'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "perfect-scrollbar", | ||
"version": "0.6.8", | ||
"version": "0.6.9", | ||
"description": "Minimalistic but perfect custom scrollbar plugin", | ||
"author": "Hyunje Alex Jun <[email protected]>", | ||
"contributors": [ | ||
|
@@ -31,6 +31,7 @@ | |
"del": "^2.0.2", | ||
"event-stream": "^3.3.1", | ||
"gulp": "^3.9.0", | ||
"gulp-autoprefixer": "^3.1.0", | ||
"gulp-connect": "^2.2.0", | ||
"gulp-eslint": "^1.0.0", | ||
"gulp-insert": "^0.5.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,3 @@ | ||
// Colors | ||
$ps-rail-hover: #eee; | ||
$ps-bar-default: #aaa; | ||
$ps-bar-hover: #999; | ||
|
||
// Helper mixins | ||
@mixin border-radius($r) { | ||
-webkit-border-radius: $r; | ||
-moz-border-radius: $r; | ||
-ms-border-radius: $r; | ||
border-radius: $r; | ||
} | ||
|
||
@mixin transition($t...) { | ||
-webkit-transition: $t; | ||
-moz-transition: $t; | ||
-o-transition: $t; | ||
transition: $t; | ||
} | ||
|
||
// Scrollbar mixins | ||
@mixin scrollbar-rail-default { | ||
display: none; | ||
position: absolute; /* please don't change 'position' */ | ||
@include border-radius(4px); | ||
opacity: 0; | ||
@include transition(background-color .2s linear, opacity .2s linear); | ||
} | ||
|
||
@mixin scrollbar-rail-hover { | ||
background-color: $ps-rail-hover; | ||
opacity: 0.9; | ||
} | ||
|
||
@mixin scrollbar-default { | ||
position: absolute; /* please don't change 'position' */ | ||
background-color: $ps-bar-default; | ||
@include border-radius(4px); | ||
@include transition(background-color .2s linear); | ||
} | ||
|
||
@mixin scrollbar-hover { | ||
background-color: $ps-bar-hover; | ||
} | ||
|
||
@mixin in-scrolling { | ||
&.ps-in-scrolling { | ||
pointer-events: none; | ||
&.ps-x>.ps-scrollbar-x-rail{ | ||
@include scrollbar-rail-hover; | ||
>.ps-scrollbar-x { | ||
@include scrollbar-hover; | ||
} | ||
} | ||
&.ps-y>.ps-scrollbar-y-rail { | ||
@include scrollbar-rail-hover; | ||
>.ps-scrollbar-y { | ||
@include scrollbar-hover; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.ps-container { | ||
-ms-touch-action: none; | ||
overflow: hidden !important; | ||
|
||
&.ps-active-x > .ps-scrollbar-x-rail, | ||
&.ps-active-y > .ps-scrollbar-y-rail { | ||
display: block; | ||
} | ||
|
||
@include in-scrolling; | ||
|
||
>.ps-scrollbar-x-rail { | ||
@include scrollbar-rail-default; | ||
bottom: 3px; /* there must be 'bottom' for ps-scrollbar-x-rail */ | ||
height: 8px; | ||
|
||
>.ps-scrollbar-x { | ||
@include scrollbar-default; | ||
bottom: 0; /* there must be 'bottom' for ps-scrollbar-x */ | ||
height: 8px; | ||
} | ||
} | ||
|
||
>.ps-scrollbar-y-rail { | ||
@include scrollbar-rail-default; | ||
right: 3px; /* there must be 'right' for ps-scrollbar-y-rail */ | ||
width: 8px; | ||
|
||
>.ps-scrollbar-y { | ||
@include scrollbar-default; | ||
right: 0; /* there must be 'right' for ps-scrollbar-y */ | ||
width: 8px; | ||
} | ||
} | ||
|
||
&:hover { | ||
@include in-scrolling; | ||
|
||
>.ps-scrollbar-x-rail, | ||
>.ps-scrollbar-y-rail { | ||
opacity: 0.6; | ||
} | ||
|
||
>.ps-scrollbar-x-rail:hover { | ||
@include scrollbar-rail-hover; | ||
|
||
>.ps-scrollbar-x { | ||
@include scrollbar-hover; | ||
} | ||
} | ||
|
||
>.ps-scrollbar-y-rail:hover { | ||
@include scrollbar-rail-hover; | ||
|
||
>.ps-scrollbar-y { | ||
@include scrollbar-hover; | ||
} | ||
} | ||
} | ||
} | ||
@import 'variables'; | ||
@import 'mixins'; | ||
@import 'themes'; |
Oops, something went wrong.