prism.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. .markdown-body {
  2. pre {
  3. background: #282a36;
  4. color: #f8f8f2;
  5. }
  6. code[class*="language-"],
  7. pre[class*="language-"] {
  8. color: #f8f8f2;
  9. background: none;
  10. text-shadow: 0 1px rgba(0, 0, 0, 0.3);
  11. font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  12. text-align: left;
  13. white-space: pre;
  14. word-spacing: normal;
  15. word-break: normal;
  16. word-wrap: normal;
  17. line-height: 1.5;
  18. -moz-tab-size: 4;
  19. -o-tab-size: 4;
  20. tab-size: 4;
  21. -webkit-hyphens: none;
  22. -moz-hyphens: none;
  23. -ms-hyphens: none;
  24. hyphens: none;
  25. }
  26. /* Code blocks */
  27. pre[class*="language-"] {
  28. padding: 1em;
  29. margin: 0.5em 0;
  30. overflow: auto;
  31. border-radius: 0.3em;
  32. }
  33. :not(pre) > code[class*="language-"],
  34. pre[class*="language-"] {
  35. background: #282a36;
  36. }
  37. /* Inline code */
  38. :not(pre) > code[class*="language-"] {
  39. padding: 0.1em;
  40. border-radius: 0.3em;
  41. white-space: normal;
  42. }
  43. .token.comment,
  44. .token.prolog,
  45. .token.doctype,
  46. .token.cdata {
  47. color: #6272a4;
  48. }
  49. .token.punctuation {
  50. color: #f8f8f2;
  51. }
  52. .namespace {
  53. opacity: 0.7;
  54. }
  55. .token.property,
  56. .token.tag,
  57. .token.constant,
  58. .token.symbol,
  59. .token.deleted {
  60. color: #ff79c6;
  61. }
  62. .token.boolean,
  63. .token.number {
  64. color: #bd93f9;
  65. }
  66. .token.selector,
  67. .token.attr-name,
  68. .token.string,
  69. .token.char,
  70. .token.builtin,
  71. .token.inserted {
  72. color: #50fa7b;
  73. }
  74. .token.operator,
  75. .token.entity,
  76. .token.url,
  77. .language-css .token.string,
  78. .style .token.string,
  79. .token.variable {
  80. color: #f8f8f2;
  81. }
  82. .token.atrule,
  83. .token.attr-value,
  84. .token.function,
  85. .token.class-name {
  86. color: #f1fa8c;
  87. }
  88. .token.keyword {
  89. color: #8be9fd;
  90. }
  91. .token.regex,
  92. .token.important {
  93. color: #ffb86c;
  94. }
  95. .token.important,
  96. .token.bold {
  97. font-weight: bold;
  98. }
  99. .token.italic {
  100. font-style: italic;
  101. }
  102. .token.entity {
  103. cursor: help;
  104. }
  105. }
  106. @mixin light {
  107. .markdown-body pre {
  108. filter: invert(1) hue-rotate(90deg) brightness(1.3);
  109. }
  110. }
  111. @mixin dark {
  112. .markdown-body pre {
  113. filter: none;
  114. }
  115. }
  116. :root {
  117. @include light();
  118. }
  119. .light {
  120. @include light();
  121. }
  122. .dark {
  123. @include dark();
  124. }
  125. @media (prefers-color-scheme: dark) {
  126. :root {
  127. @include dark();
  128. }
  129. }