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.

687 lines
14 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
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 {
  97. padding: 0em;
  98. }
  99. .ui.table.segment:after {
  100. display: none;
  101. }
  102. .ui.table.segment.stacked:after {
  103. display: block;
  104. }
  105. /* Responsive */
  106. @media only screen and (max-width : 768px) {
  107. .ui.table {
  108. display: block;
  109. padding: 0em;
  110. }
  111. .ui.table thead {
  112. display: @responsiveHeaderDisplay;
  113. }
  114. .ui.table tfoot {
  115. display: @responsiveFooterDisplay;
  116. }
  117. .ui.table tbody {
  118. display: block;
  119. }
  120. .ui.table tr {
  121. display: block;
  122. }
  123. .ui.table tr > td {
  124. width: 100% !important;
  125. display: block;
  126. border: none !important;
  127. padding: @responsiveCellVerticalPadding @responsiveCellHorizontalPadding;
  128. box-shadow: @responsiveCellBoxShadow
  129. }
  130. .ui.table td:first-child {
  131. font-weight: bold;
  132. padding-top: @responsiveRowVerticalPadding;
  133. }
  134. .ui.table td:last-child {
  135. box-shadow: @responsiveRowBoxShadow;
  136. padding-bottom: @responsiveRowVerticalPadding;
  137. }
  138. /* Clear BG Colors */
  139. .ui.table tr > td.warning,
  140. .ui.table tr > td.error,
  141. .ui.table tr > td.active,
  142. .ui.table tr > td.positive,
  143. .ui.table tr > td.negative {
  144. background-color: @responsiveStatusColor !important;
  145. }
  146. }
  147. /*******************************
  148. States
  149. *******************************/
  150. /*--------------
  151. Positive
  152. ---------------*/
  153. .ui.table tr.positive,
  154. .ui.table td.positive {
  155. box-shadow: @positiveBoxShadow;
  156. }
  157. .ui.table tr.positive td,
  158. .ui.table td.positive {
  159. background: @positiveBackgroundColor !important;
  160. color: @positiveColor !important;
  161. }
  162. .ui.celled.table tr.positive:hover td,
  163. .ui.celled.table tr:hover td.positive,
  164. .ui.table tr.positive:hover td,
  165. .ui.table td:hover.positive,
  166. .ui.table th:hover.positive {
  167. background: @positiveBackgroundHover !important;
  168. color: @positiveColorHover !important;
  169. }
  170. /*--------------
  171. Negative
  172. ---------------*/
  173. .ui.table tr.negative,
  174. .ui.table td.negative {
  175. box-shadow: @negativeBoxShadow;
  176. }
  177. .ui.table tr.negative td,
  178. .ui.table td.negative {
  179. background: @negativeBackgroundColor !important;
  180. color: @negativeColor !important;
  181. }
  182. .ui.celled.table tr.negative:hover td,
  183. .ui.celled.table tr:hover td.negative,
  184. .ui.table tr.negative:hover td,
  185. .ui.table td:hover.negative,
  186. .ui.table th:hover.negative {
  187. background: @negativeBackgroundHover !important;
  188. color: @negativeColorHover !important;
  189. }
  190. /*--------------
  191. Error
  192. ---------------*/
  193. .ui.table tr.error,
  194. .ui.table td.error {
  195. box-shadow: @errorBoxShadow;
  196. }
  197. .ui.table tr.error td,
  198. .ui.table td.error {
  199. background: @errorBackgroundColor !important;
  200. color: @errorColor !important;
  201. }
  202. .ui.celled.table tr.error:hover td,
  203. .ui.celled.table tr:hover td.error,
  204. .ui.table tr.error:hover td,
  205. .ui.table td:hover.error,
  206. .ui.table th:hover.error {
  207. background: @errorBackgroundHover !important;
  208. color: @errorColorHover !important;
  209. }
  210. /*--------------
  211. Warning
  212. ---------------*/
  213. .ui.table tr.warning,
  214. .ui.table td.warning {
  215. box-shadow: @warningBoxShadow;
  216. }
  217. .ui.table tr.warning td,
  218. .ui.table td.warning {
  219. background: @warningBackgroundColor !important;
  220. color: @warningColor !important;
  221. }
  222. .ui.celled.table tr.warning:hover td,
  223. .ui.celled.table tr:hover td.warning,
  224. .ui.table tr.warning:hover td,
  225. .ui.table td:hover.warning,
  226. .ui.table th:hover.warning {
  227. background: @warningBackgroundHover !important;
  228. color: @warningColorHover !important;
  229. }
  230. /*--------------
  231. Active
  232. ---------------*/
  233. .ui.table tr.active,
  234. .ui.table td.active {
  235. box-shadow: @activeBoxShadow;
  236. }
  237. .ui.table tr.active td,
  238. .ui.table td.active {
  239. background: @activeBackgroundColor !important;
  240. color: @activeColor !important;
  241. }
  242. .ui.celled.table tr.active:hover td,
  243. .ui.celled.table tr:hover td.active,
  244. .ui.table tr.active:hover td,
  245. .ui.table td:hover.active,
  246. .ui.table th:hover.active {
  247. background: @warningBackgroundHover !important;
  248. color: @warningColorHover !important;
  249. }
  250. /*--------------
  251. Disabled
  252. ---------------*/
  253. .ui.table tr.disabled td,
  254. .ui.table tr td.disabled,
  255. .ui.table tr.disabled:hover td,
  256. .ui.table tr:hover td.disabled {
  257. color: rgba(150, 150, 150, 0.3);
  258. }
  259. /*******************************
  260. Variations
  261. *******************************/
  262. /*--------------
  263. Striped
  264. ---------------*/
  265. /* Table Striping */
  266. .ui.striped.table > tr:nth-child(2n),
  267. .ui.striped.table tbody tr:nth-child(2n) {
  268. background-color: @stripedBackground;
  269. }
  270. /* Stripes */
  271. .ui.inverted.striped.table > tr:nth-child(2n),
  272. .ui.inverted.striped.table tbody tr:nth-child(2n) {
  273. background-color: @invertedStripedBackground;
  274. }
  275. /*-------------------
  276. Colors
  277. --------------------*/
  278. .ui.black.table {
  279. border-top: @coloredBorderSize solid @black;
  280. border-radius: @coloredBorderRadius;
  281. }
  282. .ui.blue.table {
  283. border-top: @coloredBorderSize solid @blue;
  284. border-radius: @coloredBorderRadius;
  285. }
  286. .ui.green.table {
  287. border-top: @coloredBorderSize solid @green;
  288. border-radius: @coloredBorderRadius;
  289. }
  290. .ui.orange.table {
  291. border-top: @coloredBorderSize solid @orange;
  292. border-radius: @coloredBorderRadius;
  293. }
  294. .ui.pink.table {
  295. border-top: @coloredBorderSize solid @pink;
  296. border-radius: @coloredBorderRadius;
  297. }
  298. .ui.purple.table {
  299. border-top: @coloredBorderSize solid @purple;
  300. border-radius: @coloredBorderRadius;
  301. }
  302. .ui.red.table {
  303. border-top: @coloredBorderSize solid @red;
  304. border-radius: @coloredBorderRadius;
  305. }
  306. .ui.teal.table {
  307. border-top: @coloredBorderSize solid @teal;
  308. border-radius: @coloredBorderRadius;
  309. }
  310. .ui.yellow.table {
  311. border-top: @coloredBorderSize solid @yellow;
  312. border-radius: @coloredBorderRadius;
  313. }
  314. /*-------------------
  315. Inverted Colors
  316. --------------------*/
  317. .ui.inverted.table,
  318. .ui.inverted.black.table {
  319. background-color: @black !important;
  320. border-radius: @borderRadius;
  321. color: @white !important;
  322. }
  323. .ui.inverted.blue.table {
  324. background-color: @blue !important;
  325. border-radius: @borderRadius;
  326. color: @white !important;
  327. }
  328. .ui.inverted.green.table {
  329. background-color: @green !important;
  330. border-radius: @borderRadius;
  331. color: @white !important;
  332. }
  333. .ui.inverted.orange.table {
  334. background-color: @orange !important;
  335. border-radius: @borderRadius;
  336. color: @white !important;
  337. }
  338. .ui.inverted.pink.table {
  339. background-color: @pink !important;
  340. border-radius: @borderRadius;
  341. color: @white !important;
  342. }
  343. .ui.inverted.purple.table {
  344. background-color: @purple !important;
  345. border-radius: @borderRadius;
  346. color: @white !important;
  347. }
  348. .ui.inverted.red.table {
  349. background-color: @red !important;
  350. border-radius: @borderRadius;
  351. color: @white !important;
  352. }
  353. .ui.inverted.teal.table {
  354. background-color: @teal !important;
  355. border-radius: @borderRadius;
  356. color: @white !important;
  357. }
  358. .ui.inverted.yellow.table {
  359. background-color: @yellow !important;
  360. border-radius: @borderRadius;
  361. color: @white !important;
  362. }
  363. /*--------------
  364. Column Count
  365. ---------------*/
  366. /* Grid Based */
  367. .ui.one.column.table td {
  368. width: @oneColumn;
  369. }
  370. .ui.two.column.table td {
  371. width: @twoColumn;
  372. }
  373. .ui.three.column.table td {
  374. width: @threeColumn;
  375. }
  376. .ui.four.column.table td {
  377. width: @fourColumn;
  378. }
  379. .ui.five.column.table td {
  380. width: @fiveColumn;
  381. }
  382. .ui.six.column.table td {
  383. width: @sixColumn;
  384. }
  385. .ui.seven.column.table td {
  386. width: @sevenColumn;
  387. }
  388. .ui.eight.column.table td {
  389. width: @eightColumn;
  390. }
  391. .ui.nine.column.table td {
  392. width: @nineColumn;
  393. }
  394. .ui.ten.column.table td {
  395. width: @tenColumn;
  396. }
  397. .ui.eleven.column.table td {
  398. width: @elevenColumn;
  399. }
  400. .ui.twelve.column.table td {
  401. width: @twelveColumn;
  402. }
  403. .ui.thirteen.column.table td {
  404. width: @thirteenColumn;
  405. }
  406. .ui.fourteen.column.table td {
  407. width: @fourteenColumn;
  408. }
  409. .ui.fifteen.column.table td {
  410. width: @fifteenColumn;
  411. }
  412. .ui.sixteen.column.table td {
  413. width: @sixteenColumn;
  414. }
  415. /* Column Width */
  416. .ui.table th.one.wide,
  417. .ui.table td.one.wide {
  418. width: @oneWide;
  419. }
  420. .ui.table th.two.wide,
  421. .ui.table td.two.wide {
  422. width: @twoWide;
  423. }
  424. .ui.table th.three.wide,
  425. .ui.table td.three.wide {
  426. width: @threeWide;
  427. }
  428. .ui.table th.four.wide,
  429. .ui.table td.four.wide {
  430. width: @fourWide;
  431. }
  432. .ui.table th.five.wide,
  433. .ui.table td.five.wide {
  434. width: @fiveWide;
  435. }
  436. .ui.table th.six.wide,
  437. .ui.table td.six.wide {
  438. width: @sixWide;
  439. }
  440. .ui.table th.seven.wide,
  441. .ui.table td.seven.wide {
  442. width: @sevenWide;
  443. }
  444. .ui.table th.eight.wide,
  445. .ui.table td.eight.wide {
  446. width: @eightWide;
  447. }
  448. .ui.table th.nine.wide,
  449. .ui.table td.nine.wide {
  450. width: @nineWide;
  451. }
  452. .ui.table th.ten.wide,
  453. .ui.table td.ten.wide {
  454. width: @tenWide;
  455. }
  456. .ui.table th.eleven.wide,
  457. .ui.table td.eleven.wide {
  458. width: @elevenWide;
  459. }
  460. .ui.table th.twelve.wide,
  461. .ui.table td.twelve.wide {
  462. width: @twelveWide;
  463. }
  464. .ui.table th.thirteen.wide,
  465. .ui.table td.thirteen.wide {
  466. width: @thirteenWide;
  467. }
  468. .ui.table th.fourteen.wide,
  469. .ui.table td.fourteen.wide {
  470. width: @fourteenWide;
  471. }
  472. .ui.table th.fifteen.wide,
  473. .ui.table td.fifteen.wide {
  474. width: @fifteenWide;
  475. }
  476. .ui.table th.sixteen.wide,
  477. .ui.table td.sixteen.wide {
  478. width: @sixteenWide;
  479. }
  480. /*--------------
  481. Celled
  482. ---------------*/
  483. .ui.celled.table th,
  484. .ui.celled.table td {
  485. border-left: @cellBorder;
  486. }
  487. .ui.celled.table th:first-child,
  488. .ui.celled.table td:first-child {
  489. border-left: none;
  490. }
  491. /*--------------
  492. Sortable
  493. ---------------*/
  494. .ui.sortable.table thead th {
  495. cursor: pointer;
  496. white-space: nowrap;
  497. color: @sortableColor;
  498. }
  499. .ui.sortable.table thead th.sorted,
  500. .ui.sortable.table thead th.sorted:hover {
  501. user-select: none;
  502. }
  503. .ui.sortable.table thead th:after {
  504. display: inline-block;
  505. content: '';
  506. width: @sortableIconWidth;
  507. opacity: @sortableIconOpacity;
  508. margin: 0em 0em 0em @sortableIconDistance;
  509. font-family: @sortableIconFont;
  510. font-style: normal;
  511. font-weight: normal;
  512. text-decoration: inherit;
  513. }
  514. .ui.sortable.table thead th.ascending:after {
  515. content: @sortableIconAscending;
  516. }
  517. .ui.sortable.table thead th.descending:after {
  518. content: @sortableIconDescending;
  519. }
  520. /* Sortable Hover */
  521. .ui.sortable.table th.disabled:hover {
  522. cursor: auto;
  523. color: @sortableDisabledColor;
  524. }
  525. .ui.sortable.table thead th:hover {
  526. background: @sortableHoverBackground;
  527. color: @sortableHoverColor;
  528. }
  529. /* Inverted Sortable */
  530. .ui.inverted.sortable.table thead th:hover {
  531. background-color: @sortableInvertedHoverBackground;
  532. color: @sortableInvertedHoverColor;
  533. }
  534. /*--------------
  535. Inverted
  536. ---------------*/
  537. /* Text Color */
  538. .ui.inverted.table {
  539. background: @invertedBackground;
  540. color: @invertedCellColor;
  541. border: @invertedBorder;
  542. }
  543. .ui.inverted.table th {
  544. background-color: @invertedHeaderBackground;
  545. color: @invertedHeaderColor;
  546. }
  547. .ui.inverted.table tr td {
  548. border-color: @invertedCellBorderColor;
  549. }
  550. /*--------------
  551. Definition
  552. ---------------*/
  553. .ui.definition.table td:first-child {
  554. background: @definitionBackground;
  555. font-weight: @definitionColor;
  556. color: @definitionColor;
  557. }
  558. /*--------------
  559. Collapsing
  560. ---------------*/
  561. .ui.collapsing.table {
  562. width: auto;
  563. }
  564. /*--------------
  565. Basic
  566. ---------------*/
  567. .ui.basic.table {
  568. background: @basicTableBackground;
  569. border: @basicTableBorder;
  570. }
  571. .ui.basic.table th {
  572. background-color: @basicTableHeaderBackground;
  573. }
  574. .ui.basic.table tbody tr {
  575. border-bottom: @basicTableCellBorder;
  576. }
  577. .ui.basic.table td {
  578. background: @basicTableCellBackground;
  579. }
  580. .ui.basic.table th,
  581. .ui.basic.table td {
  582. padding: @basicTableCellVerticalPadding @basicTableCellHorizontalPadding;
  583. }
  584. .ui.basic.striped.table tbody tr:nth-child(2n) {
  585. background-color: @basicTableStripedBackground !important;
  586. }
  587. /*--------------
  588. Padded
  589. ---------------*/
  590. .ui.padded.table th,
  591. .ui.padded.table td {
  592. padding: @paddedVerticalPadding @paddedHorizontalPadding;
  593. }
  594. .ui.compact.table td {
  595. padding: @compactVerticalPadding @compactHorizontalPadding;
  596. }
  597. /*--------------
  598. Sizes
  599. ---------------*/
  600. /* Small */
  601. .ui.small.table {
  602. font-size: @small;
  603. }
  604. /* Standard */
  605. .ui.table {
  606. font-size: @medium;
  607. }
  608. /* Large */
  609. .ui.large.table {
  610. font-size: @large;
  611. }
  612. .loadUIOverrides();