prism.scss 2.1 KB

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