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.

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