footable.core.less 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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:0 5px 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. .pagination>li>a, .pagination>li>span {
  185. position: relative;
  186. float: left;
  187. padding: 6px 12px;
  188. line-height: 1.42857143;
  189. text-decoration: none;
  190. border: 1px solid @default-border-color;
  191. margin-left: -1px;
  192. }
  193. .pagination {
  194. li {
  195. &:first-child {
  196. a, span {
  197. border-top-left-radius: 0.25rem;
  198. border-bottom-left-radius: 0.25rem;
  199. }
  200. }
  201. &:last-child {
  202. a, span {
  203. border-top-right-radius: 0.25rem;
  204. border-bottom-right-radius: 0.25rem;
  205. }
  206. }
  207. }
  208. }
  209. .pagination>.disabled>span, .pagination>.disabled>span:hover, .pagination>.disabled>span:focus, .pagination>.disabled>a, .pagination>.disabled>a:hover, .pagination>.disabled>a:focus {
  210. color: @baseFontcolor;
  211. }
  212. .pagination>.active>a, .pagination>.active>span, .pagination>.active>a:hover, .pagination>.active>span:hover, .pagination>.active>a:focus, .pagination>.active>span:focus {
  213. z-index: 2;
  214. color: @white;
  215. background-color: @themeColor;
  216. border-color: @themeColor;
  217. cursor: default;
  218. }
  219. }
  220. .footable-row-detail-inner {
  221. display:table;
  222. }
  223. .footable-row-detail-row {
  224. display: table-row;
  225. line-height: 1.5em;
  226. }
  227. .footable-row-detail-group {
  228. display: block;
  229. line-height: 2em;
  230. font-size: 1.2em;
  231. font-weight: bold;
  232. }
  233. .footable-row-detail-name {
  234. display: table-cell;
  235. font-weight: bold;
  236. padding-right: 0.5em;
  237. }
  238. .footable-row-detail-value {
  239. display: table-cell;
  240. }
  241. .footable-odd {
  242. background-color: @colorStriping;
  243. }