components icon indicating copy to clipboard operation
components copied to clipboard

mat-table: change height of rows (mat-row) and cells (mat-cell) to 52px

Open ryan-neufeld opened this issue 7 years ago • 6 comments

Bug, feature request, or proposal:

Change height of a row (mat-row)/cell (mat-cell) to 52px (51px + 1px bottom border)

What is the expected behavior?

Material Designs Guidelines show the height of a row as 52px OR (51px + 1px top border) upon inspecting the code of the material components for the web example

What is the current behavior?

Currently, inside of mat-table, mat-row seems to show a height of 48px with no padding or border and mat-cell shows a height of 47px + 1px bottom border

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://stackblitz.com/angular/vjavnrpqeyj?file=src%2Fapp%2Ftable-basic-example.html

Open inspect element on any example of mat-table and find mat-row + mat-cell for an example.

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

Consistency across Material Design implementations.

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

All.

Is there anything else we should know?

N/A.

ryan-neufeld avatar Nov 15 '19 20:11 ryan-neufeld

I'm having the same issue, I'm needing a smaller height to get a more compact table view. The table is an outcome of a markdown, which I styled to get the row height to a less number. If created and displayed in a card view, therefore I need the more compact row height it works fine. But, if I then switch to a page where the mat-table, mat-row show a height of 48px with no padding or border and mat-cell shows a height of 47px + 1px bottom border and then sitch back to my card view, the compact row height is overwritten. That's how it should look and how it looks after switching as describe above. matTableCell

beberhard avatar May 14 '20 12:05 beberhard

Use this on your style.css

      .mat-row{
        height: 10px !important;
      }

Hasintha-git avatar Jan 13 '23 15:01 Hasintha-git

try this .mat-mdc-row{ height: 10px !important; }

rajeshtarte avatar Dec 30 '24 12:12 rajeshtarte

suggested setting are not works...

laszlokovari avatar Nov 06 '25 19:11 laszlokovari

We are closing this issue, because we've determined, using a semi-automated process, that it is no longer relevant, has low engagement, or it does not have enough information to proceed. Feel free to comment if you think the issue should be reopened, or open a new issue with the latest version of our code instead.

crisbeto avatar May 29 '26 12:05 crisbeto

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.