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(expansion-panel): inconsistent margin for nested panels #11305

Merged

Conversation

crisbeto
Copy link
Member

Fixes some inconsistent margin when expansion panels are nested inside other expansion panels.

Fixes #11254.

Fixes some inconsistent margin when expansion panels are nested inside other expansion panels.

Fixes angular#11254.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 13, 2018
@@ -26,12 +26,12 @@
margin: 16px 0;

.mat-accordion > &:first-child,
.mat-accordion > *:first-child & {
.mat-accordion > *:first-child:not(.mat-expansion-panel) & {
Copy link
Member Author

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.

Copy link
Member

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.

@josephperrott josephperrott added pr: lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed pr: needs review labels May 14, 2018
@tinayuangao tinayuangao merged commit 1bf5c41 into angular:master May 15, 2018
tinayuangao pushed a commit that referenced this pull request May 15, 2018
Fixes some inconsistent margin when expansion panels are nested inside other expansion panels.

Fixes #11254.
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested expansion panel have irrelevant margin.
4 participants