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

mat-expansion-panel-header expand/collapse animation jumps on non default header sizes #8592

Closed
efsinua opened this issue Nov 22, 2017 · 8 comments
Assignees
Labels
animation This issue is related to Angular animations or CSS animations P4 A relatively minor issue that is not relevant to core functions

Comments

@efsinua
Copy link

efsinua commented Nov 22, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Smooth animation transition of <mat-expansion-panel-header> on expand/collapse if header height is not default.

What is the current behavior?

When <mat-expansion-panel-header> height is changed with styling, animation jumps on expand/collapse to hard coded sizes at expansionHeight animation trigger to collapsedHeight: 48px or expandedHeight: 64px instead of smooth transition

What are the steps to reproduce?

http://plnkr.co/edit/zIEeYb?p=preview

What is the use-case or motivation for changing an existing behavior?

Possibility to override default <mat-expansion-panel-header> height

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

all including Angular Material 5.0.0-rc.1

Is there anything else we should know?

if replace values at expansion-panel-header.ts at animations trigger('expansionHeight',...)
collapsedHeight: '48px' to collapsedHeight: '*'
expandedHeight: '64px' to expandedHeight: '*'

expand/collapse animation will work smoothly

@amouly
Copy link

amouly commented Nov 24, 2017

Verified, we have te same problem when changing the height of the header.

@josephperrott josephperrott added animation This issue is related to Angular animations or CSS animations P4 A relatively minor issue that is not relevant to core functions labels Nov 28, 2017
@atluriajith
Copy link

Any update on this? #5641 stating that to height and width as a attributes but can we handle this from CSS?.

@josephperrott
Copy link
Member

josephperrott commented Jan 9, 2018

This is actually working as expected.

If the collapsedHeight and expandedHeight are left to default, they will be 48px and 64px respectively. To define the height via css, you will need to set the parameters for the animation to * for both.

We can consider changing the way that height is defined for material defaults to allow for css stylings to apply as mentioned above, however we will need to ensure that this does not have unexpected impact before considering it as a viable option.

@atluriajith
Copy link

@josephperrott Thanks for the update 👍

@josephperrott
Copy link
Member

Closed by #9313

@elrabelo
Copy link

@josephperrott I tried to do this, but it's not working yet. See this example: https://stackblitz.com/edit/angular-p6rpru. The animation occurs when the page loads.

@arjentuin
Copy link

line-height: 0;
Did the trick for me on class mat-expansion-indicator

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
animation This issue is related to Angular animations or CSS animations P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

6 participants