-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(expansion-panel): inconsistent margin for nested panels #11305
fix(expansion-panel): inconsistent margin for nested panels #11305
Conversation
Fixes some inconsistent margin when expansion panels are nested inside other expansion panels. Fixes angular#11254.
@@ -26,12 +26,12 @@ | |||
margin: 16px 0; | |||
|
|||
.mat-accordion > &:first-child, | |||
.mat-accordion > *:first-child & { | |||
.mat-accordion > *:first-child:not(.mat-expansion-panel) & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josephperrott this selector was introduced in 85252b3, but it wasn't clear from the original PR exactly what it was fixing. These changes shouldn't break anything, as far as I could tell, but it might be worth double-checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is to allow for intermediate elements in accordions, to allow for components to be used to create expansion panels
So it would end up like this:
<mat-accordion>
<my-comp>
<mat-expansion-panel>
...
I think that this should be the correction needed, though it might be good for us to explore controlling this spacing with an angular animation. But I can do that in another PR.
Fixes some inconsistent margin when expansion panels are nested inside other expansion panels. Fixes #11254.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes some inconsistent margin when expansion panels are nested inside other expansion panels.
Fixes #11254.