_datatables.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. // ================================================================================================
  2. // File Name: datatables.scss
  3. // Description: Datatables pages custom scss
  4. // ----------------------------------------------------------------------------------------------
  5. // Item Name: Vuexy - Vuejs, React, Angular, HTML & Laravel Admin Dashboard Template
  6. // Author: PIXINVENT
  7. // Author URL: http://www.themeforest.net/user/pixinvent
  8. // ================================================================================================
  9. table.dataTable {
  10. // table width & collapse border
  11. width: 100% !important;
  12. border-collapse: collapse !important;
  13. td,
  14. th {
  15. padding: $table-cell-padding 1.5rem;
  16. vertical-align: middle;
  17. }
  18. thead {
  19. // Sorting Icons Change
  20. .sorting,
  21. .sorting_asc,
  22. .sorting_desc {
  23. padding-right: inherit;
  24. &:before {
  25. background-image: url(str-replace(str-replace($chevron-up, 'currentColor', $table-head-color), '#', '%23'));
  26. background-repeat: no-repeat;
  27. background-position: center;
  28. background-size: 12px;
  29. color: $body-color;
  30. width: 14px;
  31. height: 14px;
  32. content: '';
  33. right: 0.3rem;
  34. top: 0.5rem;
  35. }
  36. &:after {
  37. background-image: url(str-replace(str-replace($chevron-down, 'currentColor', $table-head-color), '#', '%23'));
  38. background-repeat: no-repeat;
  39. background-position: center;
  40. background-size: 12px;
  41. color: $body-color;
  42. width: 14px;
  43. height: 14px;
  44. content: '';
  45. right: 0.3rem;
  46. top: 1.3rem;
  47. }
  48. }
  49. }
  50. // datatables with checkbox styling
  51. .dt-checkboxes-cell {
  52. .custom-control {
  53. padding-left: 0;
  54. padding-right: 1.25rem;
  55. }
  56. }
  57. }
  58. div.dataTables_wrapper .dt-button-collection {
  59. background-color: $dropdown-bg;
  60. > div[role='menu'] {
  61. text-align: left;
  62. box-shadow: 0px 5px 16px -8px;
  63. min-width: 8rem;
  64. }
  65. [class*='buttons-']:focus {
  66. outline: 0;
  67. }
  68. }
  69. // data table search, labels and
  70. div.dataTables_wrapper {
  71. // data table search, labels
  72. div.dataTables_filter,
  73. div.dataTables_length {
  74. label {
  75. margin-top: 1rem;
  76. margin-bottom: 0.5rem;
  77. }
  78. // for datatable length select
  79. select {
  80. background-position: calc(100% - 3px) 11px, calc(100% - 20px) 13px, 100% 0;
  81. padding: 0 0.8rem;
  82. width: 5rem;
  83. margin: 0 0.5rem;
  84. }
  85. }
  86. div.dataTables_filter input {
  87. margin-left: 0.75rem;
  88. }
  89. // pagination
  90. div.dataTables_paginate {
  91. ul.pagination {
  92. margin-top: 1rem;
  93. margin-bottom: 1.5rem;
  94. }
  95. }
  96. // info text color
  97. .dataTables_info {
  98. padding-top: 1.25rem !important;
  99. color: $text-muted;
  100. }
  101. }
  102. // row grouping
  103. tr.group {
  104. // row grouping color
  105. background-color: $table-accent-bg;
  106. }
  107. // pagination in center
  108. @media only screen and (max-width: 768px) {
  109. div.dataTables_wrapper {
  110. div.dataTables_paginate {
  111. ul.pagination {
  112. justify-content: center;
  113. }
  114. }
  115. }
  116. div.dataTables_wrapper div.dataTables_info {
  117. white-space: inherit;
  118. }
  119. // small screen button spacing in bottom
  120. div.dt-buttons {
  121. justify-content: center;
  122. margin-top: 1rem;
  123. button {
  124. margin-bottom: 0.5rem;
  125. }
  126. }
  127. }
  128. @include media-breakpoint-down(xs) {
  129. .dtr-bs-modal {
  130. .modal-body {
  131. padding-left: 0;
  132. padding-right: 0;
  133. overflow-x: scroll;
  134. }
  135. .table.dtr-details {
  136. margin: 0 auto 1rem;
  137. td {
  138. padding-left: 0;
  139. padding-right: 0;
  140. }
  141. tr td:first-child {
  142. padding-left: 0.75rem;
  143. }
  144. }
  145. }
  146. div.dataTables_wrapper {
  147. overflow: scroll;
  148. }
  149. }