'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?

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

css


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source