_tables.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. table,
  2. tbody,
  3. thead {
  4. display: inline-block;
  5. width: 100%;
  6. }
  7. .gpm-details {
  8. width: 100%;
  9. @include flex(auto);
  10. }
  11. td {
  12. border: 0;
  13. }
  14. tr {
  15. @include transition(all 0.2s ease);
  16. @include display(flex);
  17. @include flex-wrap(wrap);
  18. @include align-items(center);
  19. th, td {
  20. display: block;
  21. @include flex(1);
  22. &.shrink {
  23. @include flex(0);
  24. }
  25. &.double {
  26. @include flex(2);
  27. }
  28. &.triple {
  29. @include flex(3);
  30. }
  31. &.quadruple {
  32. @include flex(4);
  33. }
  34. &.quintuple {
  35. @include flex(5);
  36. }
  37. &.sextuple {
  38. @include flex(6);
  39. }
  40. &.septuple {
  41. @include flex(7);
  42. }
  43. &.octuple {
  44. @include flex(8);
  45. }
  46. &.nontuple {
  47. @include flex(9);
  48. }
  49. &.dectuple {
  50. @include flex(10);
  51. }
  52. &:first-child {
  53. padding-left: $padding-default;
  54. @include breakpoint(mobile-only) {
  55. padding-left: 1rem;
  56. }
  57. }
  58. &:last-child {
  59. padding-right: $padding-default;
  60. @include breakpoint(mobile-only) {
  61. padding-right: 1rem;
  62. }
  63. }
  64. &.left {
  65. text-align: left;
  66. }
  67. &.center {
  68. text-align: center;
  69. }
  70. &.right {
  71. text-align: right;
  72. }
  73. &.right.pad {
  74. padding-right: $padding-default;
  75. .form-data {
  76. padding-right: 0;
  77. }
  78. }
  79. &.left.pad {
  80. padding-left: $padding-default;
  81. }
  82. &.ellipsis {
  83. white-space: nowrap;
  84. overflow: hidden;
  85. text-overflow: ellipsis;
  86. &.rtl {
  87. text-align: left;
  88. }
  89. }
  90. &.rtl {
  91. direction: rtl;
  92. }
  93. }
  94. th {
  95. font-weight: bold;
  96. }
  97. td {
  98. &.gpm-actions {
  99. padding-right: $padding-default + 1rem;
  100. }
  101. &.gpm-actions {
  102. line-height: 1;
  103. text-align: right;
  104. position: relative;
  105. .gpm-details-expand {
  106. position: absolute;
  107. top: 12px;
  108. right: 12px;
  109. }
  110. }
  111. &.gpm-details {
  112. margin: 0;
  113. padding: 0;
  114. @include breakpoint(mobile-only){
  115. word-wrap: break-word;
  116. }
  117. > .table-wrapper {
  118. display: none;
  119. td {
  120. border-bottom: 0;
  121. }
  122. }
  123. tbody {
  124. width: 100%;
  125. }
  126. }
  127. }
  128. &:last-child {
  129. td {
  130. border-bottom: 0;
  131. }
  132. }
  133. }
  134. table.noflex {
  135. display: table;
  136. table-layout: auto;
  137. thead {
  138. display: table-header-group;
  139. }
  140. tbody {
  141. display: table-row-group;
  142. }
  143. tr {
  144. display: table-row;
  145. td, th {
  146. flex: none;
  147. display: table-cell;
  148. }
  149. }
  150. }