_datatables.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /* Datatable */
  2. table.dataTable {
  3. clear: both;
  4. margin-top: 15px !important;
  5. margin-bottom: 15px !important;
  6. max-width: none !important;
  7. border-collapse: separate !important;
  8. td, th {
  9. -webkit-box-sizing: content-box;
  10. box-sizing: content-box;
  11. }
  12. td.dataTables_empty, th.dataTables_empty {
  13. text-align: center;
  14. }
  15. &.nowrap {
  16. th, td {
  17. white-space: nowrap;
  18. }
  19. }
  20. }
  21. div.dataTables_wrapper div {
  22. &.dataTables_length {
  23. label {
  24. font-weight: normal;
  25. text-align: left;
  26. white-space: nowrap;
  27. }
  28. select {
  29. width: 75px;
  30. display: inline-block;
  31. }
  32. }
  33. &.dataTables_filter {
  34. text-align: right;
  35. label {
  36. font-weight: normal;
  37. white-space: nowrap;
  38. text-align: left;
  39. }
  40. input {
  41. margin-left: 0.5em;
  42. display: inline-block;
  43. width: auto;
  44. }
  45. }
  46. &.dataTables_info {
  47. padding-top: 0.85em;
  48. white-space: nowrap;
  49. }
  50. &.dataTables_paginate {
  51. margin: 0;
  52. white-space: nowrap;
  53. text-align: right;
  54. ul.pagination {
  55. margin: 2px 0;
  56. white-space: nowrap;
  57. justify-content: flex-end;
  58. }
  59. }
  60. &.dataTables_processing {
  61. position: absolute;
  62. top: 50%;
  63. left: 50%;
  64. width: 200px;
  65. margin-left: -100px;
  66. margin-top: -26px;
  67. text-align: center;
  68. padding: 1em 0;
  69. }
  70. }
  71. table.dataTable thead {
  72. > tr > {
  73. th, td {
  74. &.sorting_asc, &.sorting_desc, &.sorting {
  75. padding-right: 30px;
  76. }
  77. }
  78. th:active, td:active {
  79. outline: none;
  80. }
  81. }
  82. .sorting, .sorting_asc, .sorting_desc, .sorting_asc_disabled, .sorting_desc_disabled {
  83. cursor: pointer;
  84. position: relative;
  85. }
  86. %sorting-style {
  87. position: absolute;
  88. bottom: 0.9em;
  89. display: block;
  90. opacity: 0.5;
  91. }
  92. .sorting {
  93. &:before, &:after {
  94. @extend %sorting-style;
  95. }
  96. }
  97. .sorting_asc {
  98. &:before, &:after {
  99. @extend %sorting-style;
  100. }
  101. }
  102. .sorting_desc {
  103. &:before, &:after {
  104. @extend %sorting-style;
  105. }
  106. }
  107. .sorting_asc_disabled {
  108. &:before, &:after {
  109. @extend %sorting-style;
  110. }
  111. }
  112. .sorting_desc_disabled {
  113. &:before, &:after {
  114. @extend %sorting-style;
  115. }
  116. }
  117. .sorting:before, .sorting_asc:before, .sorting_desc:before, .sorting_asc_disabled:before, .sorting_desc_disabled:before {
  118. right: 1em;
  119. content: "\2191";
  120. font-size: 15px;
  121. }
  122. .sorting:after, .sorting_asc:after, .sorting_desc:after, .sorting_asc_disabled:after, .sorting_desc_disabled:after {
  123. right: 0.5em;
  124. content: "\2193";
  125. font-size: 15px;
  126. }
  127. .sorting_asc:before, .sorting_desc:after {
  128. opacity: 1;
  129. }
  130. .sorting_asc_disabled:before, .sorting_desc_disabled:after {
  131. opacity: 0;
  132. }
  133. }
  134. div {
  135. &.dataTables_scrollHead table.dataTable {
  136. margin-bottom: 0 !important;
  137. }
  138. &.dataTables_scrollBody table {
  139. border-top: none;
  140. margin-top: 0 !important;
  141. margin-bottom: 0 !important;
  142. thead {
  143. .sorting:after, .sorting_asc:after, .sorting_desc:after {
  144. display: none;
  145. }
  146. }
  147. tbody tr:first-child {
  148. th, td {
  149. border-top: none;
  150. }
  151. }
  152. }
  153. &.dataTables_scrollFoot > .dataTables_scrollFootInner {
  154. box-sizing: content-box;
  155. > table {
  156. margin-top: 0 !important;
  157. border-top: none;
  158. }
  159. }
  160. }
  161. @media screen and (max-width: 767px) {
  162. div.dataTables_wrapper div {
  163. &.dataTables_length, &.dataTables_filter, &.dataTables_info, &.dataTables_paginate {
  164. text-align: center;
  165. margin-top: 11px;
  166. margin-bottom: 10px;
  167. }
  168. div.dataTables_paginate ul.pagination{
  169. flex-wrap: wrap !important;
  170. justify-content: center !important;
  171. li {
  172. margin-bottom: 10px;
  173. a {
  174. font-size: 11px;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. table {
  181. &.dataTable.table-sm {
  182. > thead > tr > th {
  183. padding-right: 20px;
  184. }
  185. .sorting:before, .sorting_asc:before, .sorting_desc:before {
  186. top: 5px;
  187. right: 0.85em;
  188. }
  189. .sorting:after, .sorting_asc:after, .sorting_desc:after {
  190. top: 5px;
  191. }
  192. }
  193. &.table-bordered.dataTable {
  194. th, td {
  195. border-left-width: 0;
  196. }
  197. th:last-child, td:last-child {
  198. border-right-width: 0;
  199. }
  200. tbody {
  201. th, td {
  202. border-bottom-width: 0;
  203. }
  204. }
  205. }
  206. }
  207. div {
  208. &.dataTables_scrollHead table.table-bordered {
  209. border-bottom-width: 0;
  210. }
  211. &.table-responsive > div.dataTables_wrapper > div.row {
  212. margin: 0;
  213. > div[class^="col-"] {
  214. &:first-child, &:last-child {
  215. padding-left: 0;
  216. padding-right: 0;
  217. }
  218. }
  219. }
  220. }