1
0

_base_dark.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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: $fg-color-dark;
  39. }
  40. }
  41. :not(.highlight) > pre {
  42. code {
  43. background-color: inherit;
  44. color: inherit;
  45. }
  46. }
  47. blockquote {
  48. border-left: 2px solid $alt-bg-color-dark;
  49. }
  50. th,
  51. td {
  52. padding: 1.6rem;
  53. }
  54. table {
  55. border-collapse: collapse;
  56. }
  57. table td,
  58. table th {
  59. border: 2px solid $alt-fg-color-dark;
  60. }
  61. table tr:first-child th {
  62. border-top: 0;
  63. }
  64. table tr:last-child td {
  65. border-bottom: 0;
  66. }
  67. table tr td:first-child,
  68. table tr th:first-child {
  69. border-left: 0;
  70. }
  71. table tr td:last-child,
  72. table tr th:last-child {
  73. border-right: 0;
  74. }
  75. }
  76. body.colorscheme-dark {
  77. @include base_dark();
  78. }
  79. body.colorscheme-auto {
  80. @media (prefers-color-scheme: dark) {
  81. @include base_dark();
  82. }
  83. }