You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

585 lines
11 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Table
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'collection';
  15. @element : 'table';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Table
  19. *******************************/
  20. /* Prototype */
  21. .ui.table {
  22. width: 100%;
  23. background: @background;
  24. border: @border;
  25. box-shadow: @boxShadow;
  26. border-radius: @borderRadius;
  27. color: @color;
  28. }
  29. .ui.table {
  30. border-collapse: @borderCollapse;
  31. border-spacing: @borderSpacing;
  32. }
  33. /* Table Content */
  34. .ui.table th,
  35. .ui.table td {
  36. transition: @transition;
  37. }
  38. /* Headers */
  39. .ui.table thead th {
  40. border-bottom: @headerBorder;
  41. cursor: auto;
  42. background-color: @headerBackground;
  43. text-align: @headerAlign;
  44. color: @headerColor;
  45. padding: @headerVerticalPadding @headerHorizontalPadding;
  46. vertical-align: @headerVerticalAlign;
  47. font-style: @headerFontStyle;
  48. font-weight: @headerFontWeight;
  49. text-transform: @headerTextTransform;
  50. }
  51. .ui.table thead th:first-child {
  52. border-radius: @borderRadius 0em 0em 0em;
  53. }
  54. .ui.table thead th:last-child {
  55. border-radius: 0em @borderRadius 0em 0em;
  56. }
  57. /* Footer */
  58. .ui.table tfoot th {
  59. cursor: auto;
  60. border-top: @footerBorder;
  61. background-color: @footerBackground;
  62. text-align: @footerAlign;
  63. color: @footerColor;
  64. padding: @footerVerticalPadding @footerHorizontalPadding;
  65. vertical-align: @footerVerticalAlign;
  66. font-style: @footerFontStyle;
  67. font-weight: @footerFontWeight;
  68. text-transform: @footerTextTransform;
  69. }
  70. .ui.table tfoot th:first-child {
  71. border-radius: 0em 0em 0em @borderRadius;
  72. }
  73. .ui.table tfoot th:last-child {
  74. border-radius: 0em 0em @borderRadius 0em;
  75. }
  76. /* Table Row */
  77. .ui.table tr td {
  78. border-top: @rowBorder;
  79. }
  80. .ui.table tr:first-child td {
  81. border-top: none;
  82. }
  83. /* Table Cells */
  84. .ui.table td {
  85. padding: @cellVerticalPadding @cellHorizontalPadding;
  86. vertical-align: @cellVerticalAlign;
  87. }
  88. /* Icons */
  89. .ui.table > .icon {
  90. vertical-align: @iconVerticalAlign;
  91. }
  92. .ui.table > .icon:only-child {
  93. margin: 0em;
  94. }
  95. /* Table Segment */
  96. .ui.table.segment:after {
  97. display: none;
  98. }
  99. .ui.table.segment.stacked:after {
  100. display: block;
  101. }
  102. /* Responsive */
  103. @media only screen and (max-width : 768px) {
  104. .ui.table {
  105. display: block;
  106. padding: 0em;
  107. }
  108. .ui.table thead {
  109. display: @responsiveHeaderDisplay;
  110. }
  111. .ui.table tfoot {
  112. display: @responsiveFooterDisplay;
  113. }
  114. .ui.table tbody {
  115. display: block;
  116. }
  117. .ui.table tr {
  118. display: block;
  119. }
  120. .ui.table tr > td {
  121. width: 100% !important;
  122. display: block;
  123. border: none !important;
  124. padding: @responsiveCellVerticalPadding @responsiveCellHorizontalPadding;
  125. box-shadow: @responsiveCellBoxShadow
  126. }
  127. .ui.table td:first-child {
  128. font-weight: bold;
  129. padding-top: @responsiveRowVerticalPadding;
  130. }
  131. .ui.table td:last-child {
  132. box-shadow: @responsiveRowBoxShadow;
  133. padding-bottom: @responsiveRowVerticalPadding;
  134. }
  135. /* Clear BG Colors */
  136. .ui.table tr > td.warning,
  137. .ui.table tr > td.error,
  138. .ui.table tr > td.active,
  139. .ui.table tr > td.positive,
  140. .ui.table tr > td.negative {
  141. background-color: @responsiveStatusColor !important;
  142. }
  143. }
  144. /*******************************
  145. States
  146. *******************************/
  147. /*--------------
  148. Positive
  149. ---------------*/
  150. .ui.table tr.positive,
  151. .ui.table td.positive {
  152. box-shadow: @positiveBoxShadow;
  153. }
  154. .ui.table tr.positive td,
  155. .ui.table td.positive {
  156. background: @positiveBackgroundColor !important;
  157. color: @positiveColor !important;
  158. }
  159. .ui.celled.table tr.positive:hover td,
  160. .ui.celled.table tr:hover td.positive,
  161. .ui.table tr.positive:hover td,
  162. .ui.table td:hover.positive,
  163. .ui.table th:hover.positive {
  164. background: @positiveBackgroundHover !important;
  165. color: @positiveColorHover !important;
  166. }
  167. /*--------------
  168. Negative
  169. ---------------*/
  170. .ui.table tr.negative,
  171. .ui.table td.negative {
  172. box-shadow: @negativeBoxShadow;
  173. }
  174. .ui.table tr.negative td,
  175. .ui.table td.negative {
  176. background: @negativeBackgroundColor !important;
  177. color: @negativeColor !important;
  178. }
  179. .ui.celled.table tr.negative:hover td,
  180. .ui.celled.table tr:hover td.negative,
  181. .ui.table tr.negative:hover td,
  182. .ui.table td:hover.negative,
  183. .ui.table th:hover.negative {
  184. background: @negativeBackgroundHover !important;
  185. color: @negativeColorHover !important;
  186. }
  187. /*--------------
  188. Error
  189. ---------------*/
  190. .ui.table tr.error,
  191. .ui.table td.error {
  192. box-shadow: @errorBoxShadow;
  193. }
  194. .ui.table tr.error td,
  195. .ui.table td.error {
  196. background: @errorBackgroundColor !important;
  197. color: @errorColor !important;
  198. }
  199. .ui.celled.table tr.error:hover td,
  200. .ui.celled.table tr:hover td.error,
  201. .ui.table tr.error:hover td,
  202. .ui.table td:hover.error,
  203. .ui.table th:hover.error {
  204. background: @errorBackgroundHover !important;
  205. color: @errorColorHover !important;
  206. }
  207. /*--------------
  208. Warning
  209. ---------------*/
  210. .ui.table tr.warning,
  211. .ui.table td.warning {
  212. box-shadow: @warningBoxShadow;
  213. }
  214. .ui.table tr.warning td,
  215. .ui.table td.warning {
  216. background: @warningBackgroundColor !important;
  217. color: @warningColor !important;
  218. }
  219. .ui.celled.table tr.warning:hover td,
  220. .ui.celled.table tr:hover td.warning,
  221. .ui.table tr.warning:hover td,
  222. .ui.table td:hover.warning,
  223. .ui.table th:hover.warning {
  224. background: @warningBackgroundHover !important;
  225. color: @warningColorHover !important;
  226. }
  227. /*--------------
  228. Active
  229. ---------------*/
  230. .ui.table tr.active,
  231. .ui.table td.active {
  232. box-shadow: @activeBoxShadow;
  233. }
  234. .ui.table tr.active td,
  235. .ui.table td.active {
  236. background: @activeBackgroundColor !important;
  237. color: @activeColor !important;
  238. }
  239. .ui.celled.table tr.active:hover td,
  240. .ui.celled.table tr:hover td.active,
  241. .ui.table tr.active:hover td,
  242. .ui.table td:hover.active,
  243. .ui.table th:hover.active {
  244. background: @warningBackgroundHover !important;
  245. color: @warningColorHover !important;
  246. }
  247. /*--------------
  248. Disabled
  249. ---------------*/
  250. .ui.table tr.disabled td,
  251. .ui.table tr td.disabled,
  252. .ui.table tr.disabled:hover td,
  253. .ui.table tr:hover td.disabled {
  254. color: rgba(150, 150, 150, 0.3);
  255. }
  256. /*******************************
  257. Variations
  258. *******************************/
  259. /*--------------
  260. Striped
  261. ---------------*/
  262. /* Table Striping */
  263. .ui.striped.table > tr:nth-child(2n),
  264. .ui.striped.table tbody tr:nth-child(2n) {
  265. background-color: @stripedBackground;
  266. }
  267. /* Stripes */
  268. .ui.inverted.striped.table > tr:nth-child(2n),
  269. .ui.inverted.striped.table tbody tr:nth-child(2n) {
  270. background-color: @invertedStripedBackground;
  271. }
  272. /*--------------
  273. Column Count
  274. ---------------*/
  275. /* Grid Based */
  276. .ui.one.column.table td {
  277. width: @oneColumn;
  278. }
  279. .ui.two.column.table td {
  280. width: @twoColumn;
  281. }
  282. .ui.three.column.table td {
  283. width: @threeColumn;
  284. }
  285. .ui.four.column.table td {
  286. width: @fourColumn;
  287. }
  288. .ui.five.column.table td {
  289. width: @fiveColumn;
  290. }
  291. .ui.six.column.table td {
  292. width: @sixColumn;
  293. }
  294. .ui.seven.column.table td {
  295. width: @sevenColumn;
  296. }
  297. .ui.eight.column.table td {
  298. width: @eightColumn;
  299. }
  300. .ui.nine.column.table td {
  301. width: @nineColumn;
  302. }
  303. .ui.ten.column.table td {
  304. width: @tenColumn;
  305. }
  306. .ui.eleven.column.table td {
  307. width: @elevenColumn;
  308. }
  309. .ui.twelve.column.table td {
  310. width: @twelveColumn;
  311. }
  312. .ui.thirteen.column.table td {
  313. width: @thirteenColumn;
  314. }
  315. .ui.fourteen.column.table td {
  316. width: @fourteenColumn;
  317. }
  318. .ui.fifteen.column.table td {
  319. width: @fifteenColumn;
  320. }
  321. .ui.sixteen.column.table td {
  322. width: @sixteenColumn;
  323. }
  324. /* Column Width */
  325. .ui.table th.one.wide,
  326. .ui.table td.one.wide {
  327. width: @oneWide;
  328. }
  329. .ui.table th.two.wide,
  330. .ui.table td.two.wide {
  331. width: @twoWide;
  332. }
  333. .ui.table th.three.wide,
  334. .ui.table td.three.wide {
  335. width: @threeWide;
  336. }
  337. .ui.table th.four.wide,
  338. .ui.table td.four.wide {
  339. width: @fourWide;
  340. }
  341. .ui.table th.five.wide,
  342. .ui.table td.five.wide {
  343. width: @fiveWide;
  344. }
  345. .ui.table th.six.wide,
  346. .ui.table td.six.wide {
  347. width: @sixWide;
  348. }
  349. .ui.table th.seven.wide,
  350. .ui.table td.seven.wide {
  351. width: @sevenWide;
  352. }
  353. .ui.table th.eight.wide,
  354. .ui.table td.eight.wide {
  355. width: @eightWide;
  356. }
  357. .ui.table th.nine.wide,
  358. .ui.table td.nine.wide {
  359. width: @nineWide;
  360. }
  361. .ui.table th.ten.wide,
  362. .ui.table td.ten.wide {
  363. width: @tenWide;
  364. }
  365. .ui.table th.eleven.wide,
  366. .ui.table td.eleven.wide {
  367. width: @elevenWide;
  368. }
  369. .ui.table th.twelve.wide,
  370. .ui.table td.twelve.wide {
  371. width: @twelveWide;
  372. }
  373. .ui.table th.thirteen.wide,
  374. .ui.table td.thirteen.wide {
  375. width: @thirteenWide;
  376. }
  377. .ui.table th.fourteen.wide,
  378. .ui.table td.fourteen.wide {
  379. width: @fourteenWide;
  380. }
  381. .ui.table th.fifteen.wide,
  382. .ui.table td.fifteen.wide {
  383. width: @fifteenWide;
  384. }
  385. .ui.table th.sixteen.wide,
  386. .ui.table td.sixteen.wide {
  387. width: @sixteenWide;
  388. }
  389. /*--------------
  390. Celled
  391. ---------------*/
  392. .ui.celled.table th,
  393. .ui.celled.table td {
  394. border-left: @cellBorder;
  395. }
  396. .ui.celled.table th:first-child,
  397. .ui.celled.table td:first-child {
  398. border-left: none;
  399. }
  400. /*--------------
  401. Sortable
  402. ---------------*/
  403. .ui.sortable.table thead th {
  404. cursor: pointer;
  405. white-space: nowrap;
  406. color: @sortableColor;
  407. }
  408. .ui.sortable.table thead th.sorted,
  409. .ui.sortable.table thead th.sorted:hover {
  410. user-select: none;
  411. }
  412. .ui.sortable.table thead th:after {
  413. display: inline-block;
  414. content: '';
  415. width: @sortableIconWidth;
  416. opacity: @sortableIconOpacity;
  417. margin: 0em 0em 0em @sortableIconDistance;
  418. font-family: @sortableIconFont;
  419. font-style: normal;
  420. font-weight: normal;
  421. text-decoration: inherit;
  422. }
  423. .ui.sortable.table thead th.ascending:after {
  424. content: @sortableIconAscending;
  425. }
  426. .ui.sortable.table thead th.descending:after {
  427. content: @sortableIconDescending;
  428. }
  429. /* Sortable Hover */
  430. .ui.sortable.table th.disabled:hover {
  431. cursor: auto;
  432. color: @sortableDisabledColor;
  433. }
  434. .ui.sortable.table thead th:hover {
  435. background: @sortableHoverBackground;
  436. color: @sortableHoverColor;
  437. }
  438. /* Inverted Sortable */
  439. .ui.inverted.sortable.table thead th:hover {
  440. background-color: @sortableInvertedHoverBackground;
  441. color: @sortableInvertedHoverColor;
  442. }
  443. /*--------------
  444. Inverted
  445. ---------------*/
  446. /* Text Color */
  447. .ui.inverted.table {
  448. color: @invertedCellColor;
  449. }
  450. .ui.inverted.table th {
  451. background-color: @invertedHeaderBackground;
  452. color: @invertedHeaderColor;
  453. }
  454. /*--------------
  455. Definition
  456. ---------------*/
  457. .ui.definition.table td:first-child {
  458. background: @definitionBackground;
  459. font-weight: @definitionColor;
  460. color: @definitionColor;
  461. }
  462. /*--------------
  463. Collapsing
  464. ---------------*/
  465. .ui.collapsing.table {
  466. width: auto;
  467. }
  468. /*--------------
  469. Basic
  470. ---------------*/
  471. .ui.basic.table {
  472. background: @basicTableBackground;
  473. border: @basicTableBorder;
  474. }
  475. .ui.basic.table th {
  476. background-color: @basicTableHeaderBackground;
  477. }
  478. .ui.basic.table tbody tr {
  479. border-bottom: @basicTableCellBorder;
  480. }
  481. .ui.basic.table td {
  482. background: @basicTableCellBackground;
  483. }
  484. .ui.basic.table th,
  485. .ui.basic.table td {
  486. padding: @basicTableCellVerticalPadding @basicTableCellHorizontalPadding;
  487. }
  488. .ui.basic.striped.table tbody tr:nth-child(2n) {
  489. background-color: @basicTableStripedBackground !important;
  490. }
  491. /*--------------
  492. Padded
  493. ---------------*/
  494. .ui.padded.table th,
  495. .ui.padded.table td {
  496. padding: @paddedVerticalPadding @paddedHorizontalPadding;
  497. }
  498. .ui.compact.table td {
  499. padding: @compactVerticalPadding @compactHorizontalPadding;
  500. }
  501. /*--------------
  502. Sizes
  503. ---------------*/
  504. /* Small */
  505. .ui.small.table {
  506. font-size: @small;
  507. }
  508. /* Standard */
  509. .ui.table {
  510. font-size: @medium;
  511. }
  512. /* Large */
  513. .ui.large.table {
  514. font-size: @large;
  515. }
  516. .loadUIOverrides();