lucca-front
lucca-front copied to clipboard
[Table] mod-card with 2 head rows
- When we have 2 rows on the header, we have a custom padding-right to remove.
- When the background is colored : add border-radius on first and last table-head-row-cell + first and last table-body-row-cell if no footer on the table, instead add border-radius on footer
pour le header :
&.mod-card {
.table-head-row:first-child {
.table-head-row-cell:first-child {
border-top-left-radius: var(--commons-borderRadius-L);
}
.table-head-row-cell:last-child {
border-top-right-radius: var(--commons-borderRadius-L);
}
}
}
il faudrait pouvoir conditionner une classe sur le body pour que si le footer est absent et qu'on est en mod-card alors on a &.mod-card { .table-body-row:first-child { .table-body-row-cell:first-child { border-bottom-left-radius: var(--commons-borderRadius-L); } .table-body-row-cell:last-child { border-bottom-right-radius: var(--commons-borderRadius-L); } } }
pour le footer :
&.mod-card {
.table-foot-row:first-child {
.table-foot-row-cell:first-child {
border-bottom-left-radius: var(--commons-borderRadius-L);
}
.table-foot-row-cell:last-child {
border-bottom-right-radius: var(--commons-borderRadius-L);
}
}
}
pour le padding remplacer le code existant par :
.table.mod-card **.table-head-row:first-child** .table-head-row-cell:last-child, .table.mod-card .table-body-row-cell:last-child, .table.mod-card .table-foot-row-cell:last-child
The issue seems to be related to --components-table-card-padding var.
We don't have propre guidelines to define table padding inside cards, you might just need to override this value to get proper results.