_table.scss 1.2 KB

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