Implement ripple effect for material themes

This commit is contained in:
eugene-sinitsyn 2020-03-04 19:31:08 +03:00
parent b03633ba9f
commit 690bd322c2
12 changed files with 70 additions and 19 deletions

View file

@ -0,0 +1,21 @@
@mixin ngx-ripple() {
.mat-ripple {
overflow: hidden;
position: relative;
&:not(:empty) {
transform: translateZ(0);
}
}
.mat-ripple-element {
position: absolute;
border-radius: 50%;
pointer-events: none;
transition: opacity, transform 0ms cubic-bezier(0, 0, 0.2, 1);
transform: scale(0);
// switch ripple color depending on selected theme
background-color: nb-theme(background-alternative-color-4);
opacity: .1;
}
}

View file

@ -18,6 +18,7 @@
@import './layout';
@import './overrides';
@import './ripple';
// install the framework and custom global styles
@include nb-install() {
@ -31,4 +32,5 @@
@include ngx-pace-theme();
@include nb-overrides();
@include ngx-ripple();
};