footable.core.less 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. // Variables
  2. @charPlus: "\e000";
  3. @charMinus: "\e001";
  4. @charCircleFilledPlus: "\e002";
  5. @charCircleFilledMinus: "\e003";
  6. @charCirclePlus: "\e004";
  7. @charCircleMinus: "\e005";
  8. @charSquarePlus: "\e006";
  9. @charSquareMinus: "\e007";
  10. @charSquareFilledPlus: "\e008";
  11. @charSquareFilledMinus: "\e009";
  12. @charCircleFilledArrowUp: "\e00a";
  13. @charCircleFilledArrowDown: "\e00b";
  14. @charCircleFilledArrowLeft: "\e00c";
  15. @charCircleFilledArrowRight: "\e00d";
  16. @charArrowUp: "\e00e";
  17. @charArrowDown: "\e00f";
  18. @charArrowLeft: "\e010";
  19. @charArrowRight: "\e011";
  20. @charArrowSmallUp: "\e012";
  21. @charArrowSmallDown: "\e013";
  22. @charArrowSmallLeft: "\e014";
  23. @charArrowSmallRight: "\e015";
  24. @charArrowAltUp: "\e016";
  25. @charArrowAltDown: "\e017";
  26. @charArrowAltLeft: "\e018";
  27. @charArrowAltRight: "\e019";
  28. @charCircleArrowUp: "\e01a";
  29. @charCircleArrowDown: "\e01b";
  30. @charCircleArrowLeft: "\e01c";
  31. @charCircleArrowRight: "\e01d";
  32. @charArrowTinyUp: "\e01e";
  33. @charArrowTinyDown: "\e01f";
  34. @charArrowTinyLeft: "\e020";
  35. @charArrowTinyRight: "\e021";
  36. @charArrowSmallUpDown: "\e022";
  37. @colorDarkGrey: #888;
  38. @colorStriping: #F7F7F7;
  39. @fontPath: "fonts/";
  40. @fontFootable: 'footable';
  41. .ToggleTheme (@charPlus, @charMinus) {
  42. > tbody > tr {
  43. &.footable-detail-show > td > span.footable-toggle:before {
  44. content: @charMinus;
  45. }
  46. > td > span.footable-toggle:before {
  47. content: @charPlus;
  48. }
  49. }
  50. }
  51. // Classes
  52. @font-face {
  53. font-family: @fontFootable;
  54. src:url('@{fontPath}footable.eot');
  55. src:url('@{fontPath}footable.eot?#iefix') format('embedded-opentype'),
  56. url('@{fontPath}footable.woff') format('woff'),
  57. url('@{fontPath}footable.ttf') format('truetype'),
  58. url('@{fontPath}footable.svg#footable') format('svg');
  59. font-weight: normal;
  60. font-style: normal;
  61. }
  62. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  63. @font-face {
  64. font-family: @fontFootable;
  65. src: url('@{fontPath}footable.svg#footable') format('svg');
  66. font-weight: normal;
  67. font-style: normal;
  68. }
  69. }
  70. .footable {
  71. width: 100%;
  72. &.breakpoint {
  73. > tbody > tr {
  74. &.footable-detail-show > td {
  75. border-bottom:none;
  76. & > span.footable-toggle:before {
  77. content: @charMinus;
  78. }
  79. }
  80. &:hover:not(.footable-row-detail) {
  81. cursor: pointer;
  82. }
  83. > td.footable-cell-detail {
  84. background: #eee;
  85. border-top:none;
  86. }
  87. > td > span.footable-toggle {
  88. display: inline-block;
  89. font-family: @fontFootable;
  90. speak: none;
  91. font-style: normal;
  92. font-weight: normal;
  93. font-variant: normal;
  94. text-transform: none;
  95. -webkit-font-smoothing: antialiased;
  96. padding-right:5px;
  97. font-size:14px;
  98. color: @colorDarkGrey;
  99. &:before {
  100. content: @charPlus;
  101. }
  102. }
  103. }
  104. &.toggle-circle {
  105. .ToggleTheme(@charCirclePlus, @charCircleMinus);
  106. }
  107. &.toggle-circle-filled {
  108. .ToggleTheme(@charCircleFilledPlus, @charCircleFilledMinus);
  109. }
  110. &.toggle-square {
  111. .ToggleTheme(@charSquarePlus, @charSquareMinus);
  112. }
  113. &.toggle-square-filled {
  114. .ToggleTheme(@charSquareFilledPlus, @charSquareFilledMinus);
  115. }
  116. &.toggle-arrow {
  117. .ToggleTheme(@charArrowRight, @charArrowDown);
  118. }
  119. &.toggle-arrow-small {
  120. .ToggleTheme(@charArrowSmallRight, @charArrowSmallDown);
  121. }
  122. &.toggle-arrow-circle {
  123. .ToggleTheme(@charCircleArrowRight, @charCircleArrowDown);
  124. }
  125. &.toggle-arrow-circle-filled {
  126. .ToggleTheme(@charCircleFilledArrowRight, @charCircleFilledArrowDown);
  127. }
  128. &.toggle-arrow-tiny {
  129. .ToggleTheme(@charArrowTinyRight, @charArrowTinyDown);
  130. }
  131. &.toggle-arrow-alt {
  132. .ToggleTheme(@charArrowAltRight, @charArrowAltDown);
  133. }
  134. &.toggle-medium > tbody > tr {
  135. > td > span.footable-toggle {
  136. font-size:18px;
  137. }
  138. }
  139. &.toggle-large > tbody > tr {
  140. > td > span.footable-toggle {
  141. font-size:24px;
  142. }
  143. }
  144. }
  145. /** SORTING **/
  146. > thead > tr > th {
  147. -webkit-touch-callout: none;
  148. -webkit-user-select: none;
  149. -khtml-user-select: none;
  150. -moz-user-select: -moz-none;
  151. -ms-user-select: none;
  152. user-select: none;
  153. &.footable-sortable:hover {
  154. cursor:pointer;
  155. }
  156. &.footable-sorted > span.footable-sort-indicator:before {
  157. content: @charArrowSmallDown;
  158. }
  159. &.footable-sorted-desc > span.footable-sort-indicator:before {
  160. content: @charArrowSmallUp;
  161. }
  162. > span.footable-sort-indicator {
  163. display: inline-block;
  164. font-family: @fontFootable;
  165. speak: none;
  166. font-style: normal;
  167. font-weight: normal;
  168. font-variant: normal;
  169. text-transform: none;
  170. -webkit-font-smoothing: antialiased;
  171. padding-left: 5px;
  172. &:before {
  173. content: @charArrowSmallUpDown;
  174. }
  175. }
  176. }
  177. /** PAGINATION **/
  178. > tfoot .pagination {
  179. margin: 0;
  180. }
  181. &.no-paging .hide-if-no-paging {
  182. display: none;
  183. }
  184. }
  185. .footable-row-detail-inner {
  186. display:table;
  187. }
  188. .footable-row-detail-row {
  189. display: table-row;
  190. line-height: 1.5em;
  191. }
  192. .footable-row-detail-group {
  193. display: block;
  194. line-height: 2em;
  195. font-size: 1.2em;
  196. font-weight: bold;
  197. }
  198. .footable-row-detail-name {
  199. display: table-cell;
  200. font-weight: bold;
  201. padding-right: 0.5em;
  202. }
  203. .footable-row-detail-value {
  204. display: table-cell;
  205. }
  206. .footable-odd {
  207. background-color: @colorStriping;
  208. }