Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

css, last-child tr overwrite style

I have this styles:

.ant-table-tbody > tr > td {
  padding: 8px 0 !important;
  height: 48px;
}
.ant-table-tbody > tr:last-child > td {
  padding: 8px 0 !important;
  height: 48px;
  border-bottom: none;
}

The last definition is almost the sam except that I’m setting `border-bottom: none“

How could I write that in one single class?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried something like:

.ant-table-tbody > tr > td {
  padding: 8px 0 !important;
  height: 48px;
  &.tr:last-child {
    border-bottom: 1px red solid;
  }
}

but it’s not working

>Solution :

You need to just correct the format

.ant-table-tbody {
  > tr > td {
    height: 48px;
    padding: 8px 0 !important;
  }

  > tr:last-child > td {
    border-bottom: 1px red solid;
  }
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading