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.

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