lucca-front icon indicating copy to clipboard operation
lucca-front copied to clipboard

[Table] mod-card with 2 head rows

Open AlexiaAlarza opened this issue 2 years ago • 3 comments

  • 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

Capture d’écran 2023-09-06 à 15 10 35 Capture d’écran 2023-09-06 à 15 13 27

AlexiaAlarza avatar Sep 06 '23 13:09 AlexiaAlarza

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);
    }
  }
}

AlexiaAlarza avatar Sep 06 '23 15:09 AlexiaAlarza

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

AlexiaAlarza avatar Sep 06 '23 15:09 AlexiaAlarza

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.

jeremie-lucca avatar Sep 12 '23 15:09 jeremie-lucca