mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
let me see that button ripple
This commit is contained in:
@@ -43,4 +43,21 @@ $button-material-border-radius: 3px !default;
|
||||
font-size: $button-small-icon-size;
|
||||
}
|
||||
|
||||
@each $color, $value in $colors {
|
||||
|
||||
&[#{$color}] {
|
||||
|
||||
@if $color != "#fff" {
|
||||
.md-ripple {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.activated {
|
||||
opacity: 1;
|
||||
background-color: get-color($color, base);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,30 @@
|
||||
|
||||
<div class="padding">
|
||||
<div>
|
||||
<a button href="#">a[button]</a>
|
||||
<button>button</button>
|
||||
<button class="hover">hover</button>
|
||||
<button class="activated">activated</button>
|
||||
<button>Default</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button primary href="#">a[primary]</a>
|
||||
<button primary>button[primary]</button>
|
||||
<button primary class="hover">hover</button>
|
||||
<button primary class="activated">activated</button>
|
||||
<button primary>Primary</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button secondary href="#">a[secondary]</a>
|
||||
<button secondary>button[secondary]</button>
|
||||
<button secondary class="hover">hover</button>
|
||||
<button secondary class="activated">activated</button>
|
||||
<button secondary>Secondary</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button danger href="#">a[danger]</a>
|
||||
<button danger>button[danger]</button>
|
||||
<button danger class="hover">hover</button>
|
||||
<button danger class="activated">activated</button>
|
||||
<button danger>Danger</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button light href="#">a[light]</a>
|
||||
<button light>button[light]</button>
|
||||
<button light class="hover">hover</button>
|
||||
<button light class="activated">activated</button>
|
||||
<button light>Light</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button stable href="#">a[stable]</a>
|
||||
<button stable>button[stable]</button>
|
||||
<button stable class="hover">hover</button>
|
||||
<button stable class="activated">activated</button>
|
||||
<button stable>Stable</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a button dark href="#">a[dark]</a>
|
||||
<button dark>button[dark]</button>
|
||||
<button dark class="hover">hover</button>
|
||||
<button dark class="activated">activated</button>
|
||||
<button dark>Dark</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,7 @@ $ripple-bg-color: black;
|
||||
$ripple-animation-curve: cubic-bezier(0, 0, 0.2, 1) !default;
|
||||
|
||||
.md-ripple {
|
||||
|
||||
background: #fff;//$ripple-bg-color;
|
||||
background: $ripple-bg-color;
|
||||
border-radius: 50%;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
|
||||
@@ -117,7 +117,9 @@ export class MaterialRippleEffect {
|
||||
|
||||
// Don't fire for the artificial "mouseup" generated by a double-click.
|
||||
if (event && event.detail !== 2) {
|
||||
this.rippleElement.classList.remove('is-visible');
|
||||
setTimeout(() => {
|
||||
this.rippleElement.classList.remove('is-visible');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user