_table.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Component: Table
  3. * ----------------
  4. */
  5. .table {
  6. &:not(.table-dark) {
  7. color: inherit;
  8. }
  9. // fixed table head
  10. &.table-head-fixed {
  11. thead tr:nth-child(1) th {
  12. background-color: $white;
  13. border-bottom: none;
  14. box-shadow: inset 0 1px 0 $table-border-color,
  15. inset 0 -1px 0 $table-border-color;
  16. position: sticky;
  17. top: 0;
  18. z-index: 10;
  19. }
  20. &.table-dark {
  21. thead tr {
  22. &:nth-child(1) th {
  23. background-color: $table-dark-bg;
  24. box-shadow: inset 0 1px 0 $table-dark-border-color,
  25. inset 0 -1px 0 $table-dark-border-color;
  26. }
  27. }
  28. }
  29. }
  30. // no border
  31. &.no-border {
  32. &,
  33. td,
  34. th {
  35. border: 0;
  36. }
  37. }
  38. // .text-center in tables
  39. &.text-center {
  40. &,
  41. td,
  42. th {
  43. text-align: center;
  44. }
  45. }
  46. .table-valign-middle {
  47. thead > tr > th,
  48. thead > tr > td,
  49. tbody > tr > th,
  50. tbody > tr > td {
  51. vertical-align: middle;
  52. }
  53. }
  54. .card-body.p-0 & {
  55. thead > tr > th,
  56. thead > tr > td,
  57. tbody > tr > th,
  58. tbody > tr > td {
  59. &:first-of-type {
  60. @extend .pl-4;
  61. }
  62. &:last-of-type {
  63. @extend .pr-4;
  64. }
  65. }
  66. }
  67. }