Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: sky/framework/sky-scrollable.sky

Issue 879003002: The scrollbar in sky-scrollable should fade in and out (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-scrollable.sky
diff --git a/sky/framework/sky-scrollable.sky b/sky/framework/sky-scrollable.sky
index 33fe82822c33e712a741978d58e8f017c9a76c22..972ea2acb04ef9828f6f8d949ce0853488a6b13f 100644
--- a/sky/framework/sky-scrollable.sky
+++ b/sky/framework/sky-scrollable.sky
@@ -31,12 +31,15 @@
pointer-events: none;
top: 0;
height: 0;
+ will-change: opacity;
+ opacity: 0;
+ transition: opacity 0.2s ease-in-out;
}
</style>
- <div id="vbar" />
<div id="scrollable">
<content />
</div>
+ <div id="vbar" />
</template>
<script>
module.exports = class extends SkyElement {
@@ -89,6 +92,7 @@ module.exports = class extends SkyElement {
cancelAnimationFrame(this.flingAnimationId_);
this.flingCurve_ = null;
this.flingAnimationId_ = null;
+ this.vbar_.style.opacity = 0;
}
updateFling_(timeStamp) {
@@ -99,9 +103,11 @@ module.exports = class extends SkyElement {
}
handleScrollStart_(event) {
+ this.vbar_.style.opacity = 1;
}
handleScrollEnd_(event) {
+ this.vbar_.style.opacity = 0;
}
handleScrollUpdate_(event) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698