From b515a46d309baf72c2573e10fa6e540bba03769e Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Sun, 19 Jul 2015 18:23:48 -0500 Subject: [PATCH] Porting ripple --- ionic/components/material/ripple.scss | 33 +++++++++++++++++++++++++++ ionic/ionic.scss | 2 ++ 2 files changed, 35 insertions(+) diff --git a/ionic/components/material/ripple.scss b/ionic/components/material/ripple.scss index e69de29bb2..447e4afcd1 100644 --- a/ionic/components/material/ripple.scss +++ b/ionic/components/material/ripple.scss @@ -0,0 +1,33 @@ +/** + * Portions lovingly adapted from Material Design Lite + * Copyright Google, 2015, Licensed under the Apache 2 license. + * https://github.com/google/material-design-lite + */ +$ripple-bg-color: black; +$ripple-animation-curve: cubic-bezier(0, 0, 0.2, 1) !default; + +.md-ripple { + + background: $ripple-bg-color; + border-radius: 50%; + height: 50px; + left: 0; + opacity: 0; + pointer-events: none; + position: absolute; + top: 0; + transform: translate(-50%, -50%); + width: 50px; + overflow: hidden; + + &.is-animating { + transition: transform 0.3s $ripple-animation-curve; + width: 0.3s $ripple-animation-curve; + height: 0.3s $ripple-animation-curve; + opacity: 0.6s $ripple-animation-curve; + } + + &.is-visible { + opacity: 0.3; + } +} diff --git a/ionic/ionic.scss b/ionic/ionic.scss index 72ad78f0b7..4e446aa51c 100755 --- a/ionic/ionic.scss +++ b/ionic/ionic.scss @@ -73,6 +73,8 @@ // Material Design Components @import + "components/material/ripple", + "components/app/extensions/material", "components/action-menu/extensions/material", "components/alert/extensions/material",