_table.scss 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ///
  2. /// Paradigm Shift by HTML5 UP
  3. /// html5up.net | @ajlkn
  4. /// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
  5. ///
  6. /* Table */
  7. .table-wrapper {
  8. -webkit-overflow-scrolling: touch;
  9. overflow-x: auto;
  10. }
  11. table {
  12. margin: 0 0 _size(element-margin) 0;
  13. width: 100%;
  14. tbody {
  15. tr {
  16. border: solid 1px _palette(border);
  17. border-left: 0;
  18. border-right: 0;
  19. &:nth-child(2n + 1) {
  20. background-color: _palette(border-bg);
  21. }
  22. }
  23. }
  24. td {
  25. padding: 0.75rem 0.75rem;
  26. }
  27. th {
  28. color: _palette(fg-bold);
  29. font-size: 0.9rem;
  30. font-weight: _font(weight-bold);
  31. padding: 0 0.75rem 0.75rem 0.75rem;
  32. text-align: left;
  33. }
  34. thead {
  35. border-bottom: solid 2px _palette(border);
  36. }
  37. tfoot {
  38. border-top: solid 2px _palette(border);
  39. }
  40. &.alt {
  41. border-collapse: separate;
  42. tbody {
  43. tr {
  44. td {
  45. border: solid 1px _palette(border);
  46. border-left-width: 0;
  47. border-top-width: 0;
  48. &:first-child {
  49. border-left-width: 1px;
  50. }
  51. }
  52. &:first-child {
  53. td {
  54. border-top-width: 1px;
  55. }
  56. }
  57. }
  58. }
  59. thead {
  60. border-bottom: 0;
  61. }
  62. tfoot {
  63. border-top: 0;
  64. }
  65. }
  66. }