Blog-style website for karathan using the self-made Stellar Theme powered by HTML5Up http://blog.karathan.at

_table.scss 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ///
  2. /// Stellar 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;
  17. border-left: 0;
  18. border-right: 0;
  19. }
  20. }
  21. td {
  22. padding: 0.75em 0.75em;
  23. }
  24. th {
  25. font-size: 0.9em;
  26. font-weight: _font(weight-bold);
  27. padding: 0 0.75em 0.75em 0.75em;
  28. text-align: left;
  29. }
  30. thead {
  31. border-bottom: solid 2px;
  32. }
  33. tfoot {
  34. border-top: solid 2px;
  35. }
  36. &.alt {
  37. border-collapse: separate;
  38. tbody {
  39. tr {
  40. td {
  41. border: solid 1px;
  42. border-left-width: 0;
  43. border-top-width: 0;
  44. &:first-child {
  45. border-left-width: 1px;
  46. }
  47. }
  48. &:first-child {
  49. td {
  50. border-top-width: 1px;
  51. }
  52. }
  53. }
  54. }
  55. thead {
  56. border-bottom: 0;
  57. }
  58. tfoot {
  59. border-top: 0;
  60. }
  61. }
  62. }
  63. @mixin color-table($p: null) {
  64. table {
  65. tbody {
  66. tr {
  67. border-color: _palette($p, border);
  68. &:nth-child(2n + 1) {
  69. background-color: _palette($p, border-bg);
  70. }
  71. }
  72. }
  73. th {
  74. color: _palette($p, fg-bold);
  75. }
  76. thead {
  77. border-bottom-color: _palette($p, border);
  78. }
  79. tfoot {
  80. border-top-color: _palette($p, border);
  81. }
  82. &.alt {
  83. tbody {
  84. tr {
  85. td {
  86. border-color: _palette($p, border);
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. @include color-table;