dataTables.responsive.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. //
  2. // Mixins
  3. //
  4. @mixin control() {
  5. display: block;
  6. position: absolute;
  7. color: white;
  8. border: 2px solid white;
  9. border-radius: 16px;
  10. text-align: center;
  11. line-height: 14px;
  12. box-shadow: 0 0 3px #444;
  13. box-sizing: content-box;
  14. }
  15. @mixin control-open() {
  16. content: '+';
  17. background-color: #31b131;
  18. }
  19. @mixin control-close() {
  20. content: '-';
  21. background-color: #d33333;
  22. }
  23. //
  24. // Table styles
  25. //
  26. table.dataTable {
  27. // Styling for the `inline` type
  28. &.dtr-inline.collapsed > tbody {
  29. > tr > td:first-child,
  30. > tr > th:first-child {
  31. position: relative;
  32. padding-left: 30px;
  33. cursor: pointer;
  34. &:before {
  35. top: 8px;
  36. left: 4px;
  37. height: 16px;
  38. width: 16px;
  39. @include control;
  40. @include control-open;
  41. }
  42. &.dataTables_empty:before {
  43. display: none;
  44. }
  45. }
  46. > tr.parent {
  47. > td:first-child:before,
  48. > th:first-child:before {
  49. @include control-close;
  50. }
  51. }
  52. > tr.child td:before {
  53. display: none;
  54. }
  55. }
  56. // DataTables' `compact` styling
  57. &.dtr-inline.collapsed.compact > tbody {
  58. > tr > td:first-child,
  59. > tr > th:first-child {
  60. padding-left: 27px;
  61. &:before {
  62. top: 5px;
  63. left: 4px;
  64. height: 14px;
  65. width: 14px;
  66. border-radius: 14px;
  67. line-height: 12px;
  68. }
  69. }
  70. }
  71. // Styling for the `column` type
  72. &.dtr-column > tbody {
  73. > tr > td.control,
  74. > tr > th.control {
  75. position: relative;
  76. cursor: pointer;
  77. &:before {
  78. top: 50%;
  79. left: 50%;
  80. height: 16px;
  81. width: 16px;
  82. margin-top: -10px;
  83. margin-left: -10px;
  84. @include control;
  85. @include control-open;
  86. }
  87. }
  88. > tr.parent {
  89. td.control:before,
  90. th.control:before {
  91. @include control-close;
  92. }
  93. }
  94. }
  95. // Child row styling
  96. > tbody > tr.child {
  97. padding: 0.5em 1em;
  98. &:hover {
  99. background: transparent !important;
  100. }
  101. ul {
  102. display: inline-block;
  103. list-style-type: none;
  104. margin: 0;
  105. padding: 0;
  106. li {
  107. border-bottom: 1px solid #efefef;
  108. padding: 0.5em 0;
  109. &:first-child {
  110. padding-top: 0;
  111. }
  112. &:last-child {
  113. border-bottom: none;
  114. }
  115. }
  116. }
  117. span.dtr-title {
  118. display: inline-block;
  119. min-width: 75px;
  120. font-weight: bold;
  121. }
  122. span.dtr-data {}
  123. }
  124. }