tables.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. table {
  2. border-radius: 0.1rem;
  3. border: 1px solid rgba(get-light-color('accent-color'), 0.1);
  4. min-width: 10rem;
  5. padding: 0.1rem;
  6. thead {
  7. tr {
  8. background: get-light-color('accent-color');
  9. color: get-light-color('text-over-accent-color');
  10. }
  11. }
  12. tbody {
  13. tr {
  14. height: 40px !important;
  15. color: get-light-color('text-color');
  16. &:nth-child(odd) {
  17. background-color: get-light-color('bg-primary');
  18. }
  19. &:nth-child(even) {
  20. background-color: rgba(get-light-color('accent-color'), 0.05);
  21. }
  22. }
  23. }
  24. th,
  25. td {
  26. padding-top: 0.2rem;
  27. padding-bottom: 0.2rem;
  28. padding-left: 0.5rem;
  29. padding-right: 0.5rem;
  30. }
  31. }
  32. .gist {
  33. table {
  34. border-radius: unset !important;
  35. background: unset !important;
  36. border: unset !important;
  37. padding: unset !important;
  38. tr {
  39. height: unset !important;
  40. }
  41. th,
  42. td {
  43. padding: unset !important;
  44. border-left: unset !important;
  45. border-bottom: unset !important;
  46. }
  47. td,
  48. tc {
  49. border-right: 1px solid rgba(get-light-color('accent-color'), 0.1);
  50. }
  51. thead {
  52. tr {
  53. background: unset !important;
  54. color: unset !important;
  55. }
  56. }
  57. tbody {
  58. tr {
  59. &:nth-child(odd) {
  60. background-color: unset !important;
  61. }
  62. &:hover {
  63. background: unset !important;
  64. }
  65. }
  66. }
  67. }
  68. }
  69. html[data-theme='dark'] {
  70. table {
  71. border: 1px solid rgba(get-dark-color('accent-color'), 0.1);
  72. thead {
  73. tr {
  74. background: get-dark-color('accent-color');
  75. color: get-dark-color('text-over-accent-color');
  76. }
  77. }
  78. tbody {
  79. tr {
  80. color: get-dark-color('text-color');
  81. &:nth-child(odd) {
  82. background-color: get-dark-color('bg-primary');
  83. }
  84. &:nth-child(even) {
  85. background-color: rgba(get-dark-color('accent-color'), 0.05);
  86. }
  87. }
  88. }
  89. }
  90. .gist {
  91. &::-moz-selection{
  92. background: get-dark-color('text-color');
  93. color: get-dark-color('inverse-text-color');
  94. }
  95. &::selection{
  96. background: get-dark-color('text-color');
  97. color: get-dark-color('inverse-text-color');
  98. }
  99. table {
  100. td,
  101. tc {
  102. border-right: 1px solid rgba(get-dark-color('accent-color'), 0.1);
  103. }
  104. }
  105. }
  106. }