dataTables.responsive.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. td:first-child,
  30. 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. }
  43. tr.parent {
  44. td:first-child:before,
  45. th:first-child:before {
  46. @include control-close;
  47. }
  48. }
  49. tr.child td:before {
  50. display: none;
  51. }
  52. }
  53. // Styling for the `column` type
  54. &.dtr-column tbody {
  55. td.control,
  56. th.control {
  57. position: relative;
  58. cursor: pointer;
  59. &:before {
  60. top: 50%;
  61. left: 50%;
  62. height: 16px;
  63. width: 16px;
  64. margin-top: -10px;
  65. margin-left: -10px;
  66. @include control;
  67. @include control-open;
  68. }
  69. }
  70. tr.parent {
  71. td.control:before,
  72. th.control:before {
  73. @include control-close;
  74. }
  75. }
  76. }
  77. // Child row styling
  78. tr.child {
  79. padding: 0.5em 1em;
  80. &:hover {
  81. background: transparent !important;
  82. }
  83. ul {
  84. display: inline-block;
  85. list-style-type: none;
  86. margin: 0;
  87. padding: 0;
  88. li {
  89. border-bottom: 1px solid #efefef;
  90. padding: 0.5em 0;
  91. &:first-child {
  92. padding-top: 0;
  93. }
  94. &:last-child {
  95. border-bottom: none;
  96. }
  97. }
  98. }
  99. span.dtr-title {
  100. display: inline-block;
  101. min-width: 75px;
  102. font-weight: bold;
  103. }
  104. span.dtr-data {}
  105. }
  106. }