Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backdrop): update the opacity to match the MD spec #16188

Merged
merged 3 commits into from Nov 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/components/action-sheet/animations/md.enter.ts
Expand Up @@ -13,7 +13,7 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.26);
backdropAnimation.fromTo('opacity', 0.01, 0.32);
wrapperAnimation.fromTo('translateY', '100%', '0%');

const ani = baseAnimation
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/action-sheet/animations/md.leave.ts
Expand Up @@ -13,7 +13,7 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.26, 0);
backdropAnimation.fromTo('opacity', 0.32, 0);
wrapperAnimation.fromTo('translateY', '0%', '100%');

const ani = baseAnimation
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/alert/animations/md.enter.ts
Expand Up @@ -12,7 +12,7 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.5);
backdropAnimation.fromTo('opacity', 0.01, 0.32);

wrapperAnimation.fromTo('opacity', 0.01, 1).fromTo('scale', 0.9, 1);

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/alert/animations/md.leave.ts
Expand Up @@ -12,7 +12,7 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.5, 0);
backdropAnimation.fromTo('opacity', 0.32, 0);

wrapperAnimation.fromTo('opacity', 0.99, 0);

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/loading/animations/md.enter.ts
Expand Up @@ -12,7 +12,7 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.5);
backdropAnimation.fromTo('opacity', 0.01, 0.32);

wrapperAnimation.fromTo('opacity', 0.01, 1).fromTo('scale', 1.1, 1);

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/loading/animations/md.leave.ts
Expand Up @@ -12,7 +12,7 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));

backdropAnimation.fromTo('opacity', 0.5, 0);
backdropAnimation.fromTo('opacity', 0.32, 0);

wrapperAnimation.fromTo('opacity', 0.99, 0).fromTo('scale', 1, 0.9);

Expand Down
10 changes: 5 additions & 5 deletions core/src/components/menu-controller/animations/overlay.ts
Expand Up @@ -23,16 +23,16 @@ export function menuOverlayAnimation(AnimationC: Animation, _: HTMLElement, menu
openedX = '0px';
}

const menuAni = new AnimationC()
const menuAnimation = new AnimationC()
.addElement(menu.menuInnerEl)
.fromTo('translateX', closedX, openedX);

const backdropAni = new AnimationC()
const backdropAnimation = new AnimationC()
.addElement(menu.backdropEl)
.fromTo('opacity', 0.01, 0.3);
.fromTo('opacity', 0.01, 0.32);

return baseAnimation(AnimationC).then(animation => {
return animation.add(menuAni)
.add(backdropAni);
return animation.add(menuAnimation)
.add(backdropAnimation);
});
}
14 changes: 7 additions & 7 deletions core/src/components/menu-controller/animations/push.ts
Expand Up @@ -21,21 +21,21 @@ export function menuPushAnimation(AnimationC: Animation, _: HTMLElement, menu: M
contentOpenedX = width + 'px';
menuClosedX = -width + 'px';
}
const menuAni = new AnimationC()
const menuAnimation = new AnimationC()
.addElement(menu.menuInnerEl)
.fromTo('translateX', menuClosedX, '0px');

const contentAni = new AnimationC()
const contentAnimation = new AnimationC()
.addElement(menu.contentEl)
.fromTo('translateX', '0px', contentOpenedX);

const backdropAni = new AnimationC()
const backdropAnimation = new AnimationC()
.addElement(menu.backdropEl)
.fromTo('opacity', 0.01, 0.2);
.fromTo('opacity', 0.01, 0.32);

return baseAnimation(AnimationC).then(animation => {
return animation.add(menuAni)
.add(backdropAni)
.add(contentAni);
return animation.add(menuAnimation)
.add(backdropAnimation)
.add(contentAnimation);
});
}
2 changes: 1 addition & 1 deletion core/src/components/modal/animations/md.enter.ts
Expand Up @@ -16,7 +16,7 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
.fromTo('opacity', 0.01, 1)
.fromTo('translateY', '40px', '0px');

backdropAnimation.fromTo('opacity', 0.01, 0.4);
backdropAnimation.fromTo('opacity', 0.01, 0.32);

return Promise.resolve(baseAnimation
.addElement(baseEl)
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/modal/animations/md.leave.ts
Expand Up @@ -17,7 +17,7 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
.fromTo('opacity', 0.99, 0)
.fromTo('translateY', '0px', '40px');

backdropAnimation.fromTo('opacity', 0.4, 0.0);
backdropAnimation.fromTo('opacity', 0.32, 0.0);

return Promise.resolve(baseAnimation
.addElement(baseEl)
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/popover/animations/md.enter.ts
Expand Up @@ -71,7 +71,7 @@ export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement, ev?

const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));
backdropAnimation.fromTo('opacity', 0.01, 0.08);
backdropAnimation.fromTo('opacity', 0.01, 0.32);

const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.popover-wrapper'));
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/popover/animations/md.leave.ts
Expand Up @@ -13,7 +13,7 @@ export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Pr
wrapperAnimation.addElement(baseEl.querySelector('.popover-wrapper'));

wrapperAnimation.fromTo('opacity', 0.99, 0);
backdropAnimation.fromTo('opacity', 0.08, 0);
backdropAnimation.fromTo('opacity', 0.32, 0);

return Promise.resolve(baseAnimation
.addElement(baseEl)
Expand Down