1
0

_base_dark.scss 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. @mixin base_dark {
  2. color: $fg-color-dark;
  3. background-color: $bg-color-dark;
  4. a {
  5. color: $link-color-dark;
  6. }
  7. h1,
  8. h2,
  9. h3,
  10. h4,
  11. h5,
  12. h6 {
  13. color: $alt-fg-color-dark;
  14. &:hover .heading-link {
  15. visibility: visible;
  16. }
  17. .heading-link {
  18. color: $link-color-dark;
  19. font-weight: inherit;
  20. text-decoration: none;
  21. font-size: 80%;
  22. visibility: hidden;
  23. }
  24. .title-link {
  25. color: inherit;
  26. font-weight: inherit;
  27. text-decoration: none;
  28. }
  29. }
  30. code {
  31. background-color: $alt-bg-color-dark;
  32. color: $fg-color-dark;
  33. }
  34. // fix color schemes which do not explicitly set fg-color
  35. .highlight {
  36. pre {
  37. background-color: $alt-bg-color-dark;
  38. color: $bg-color-dark;
  39. code {
  40. background-color: inherit;
  41. color: inherit;
  42. }
  43. }
  44. }
  45. :not(.highlight) > pre {
  46. code {
  47. background-color: inherit;
  48. color: inherit;
  49. }
  50. }
  51. blockquote {
  52. border-left: 2px solid $alt-bg-color-dark;
  53. }
  54. th,
  55. td {
  56. padding: 1.6rem;
  57. }
  58. table {
  59. border-collapse: collapse;
  60. }
  61. table td,
  62. table th {
  63. border: 2px solid $alt-fg-color-dark;
  64. }
  65. table tr:first-child th {
  66. border-top: 0;
  67. }
  68. table tr:last-child td {
  69. border-bottom: 0;
  70. }
  71. table tr td:first-child,
  72. table tr th:first-child {
  73. border-left: 0;
  74. }
  75. table tr td:last-child,
  76. table tr th:last-child {
  77. border-right: 0;
  78. }
  79. }
  80. body.colorscheme-dark {
  81. @include base_dark();
  82. }
  83. body.colorscheme-auto {
  84. @media (prefers-color-scheme: dark) {
  85. @include base_dark();
  86. }
  87. }