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

Ripple on mat-row breaks cells in 6.0 version #11165

Closed
vanmxpx opened this issue May 4, 2018 · 3 comments · Fixed by #12645
Closed

Ripple on mat-row breaks cells in 6.0 version #11165

vanmxpx opened this issue May 4, 2018 · 3 comments · Fixed by #12645
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@vanmxpx
Copy link

vanmxpx commented May 4, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Ripple on mat-row

What is the current behavior?

Ripple effect last cells padding in material table and breaks all row

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-gd2jqa

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

If it is problem in new ripple logic it may affects not only row component of material controls

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

material 6.0

Is there anything else we should know?

All works fine in previous versions

@josephperrott josephperrott added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 4, 2018
@simeyla
Copy link

simeyla commented May 6, 2018

Your explanation has unclear english but I believe I'm having the same issue (using mat-table with flex model).

The problem is that the way ripple works is to add a mat-ripple-element inside the table 'row' as the last element.

The new css for version 6 contains the following to add padding to the left and right of a table.

mat-cell:last-child, mat-header-cell:last-child, mat-footer-cell:last-child {
  padding-right: $mat-row-horizontal-padding;

  [dir='rtl'] & {
    padding-right: 0;
    padding-left: $mat-row-horizontal-padding;
  }
}

So as soon as mat-ripple-element is added then the actual table cell is no longer the :last-child so you get a jump because the padding is removed all the cells use the standard flex logic to fill the remaining space.

I don't have a hacky solution - choosing to just ignore it for now and wait for a proper fix.

@EreckGordon
Copy link

/* dumb hack to deal with mat-ripple breaking css */
mat-cell:last-child, mat-header-cell:last-child, mat-footer-cell:last-child {
  padding-right: 0px !important;
}

gross !important, hopefully this gets fixed sooner than later

@crisbeto crisbeto self-assigned this Aug 12, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Aug 12, 2018
Fixes extra decorative elements like badges or ripples throwing off the alignment in tables.

Fixes angular#11165.
jelbourn pushed a commit that referenced this issue Aug 21, 2018
Fixes extra decorative elements like badges or ripples throwing off the alignment in tables.

Fixes #11165.
jelbourn pushed a commit that referenced this issue Aug 29, 2018
Fixes extra decorative elements like badges or ripples throwing off the alignment in tables.

Fixes #11165.
@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants