prism.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /* PrismJS 1.20.0
  2. https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+c+csharp+cpp+coffeescript+css-extras+diff+go+http+ini+java+json+json5+jsonp+kotlin+less+lua+makefile+markdown+markup-templating+nginx+objectivec+perl+php+php-extras+python+ruby+rust+scss+sql+swift+toml+typescript+xquery+yaml&plugins=line-highlight+line-numbers */
  3. /**
  4. * prism.js default theme for JavaScript, CSS and HTML
  5. * Based on dabblet (http://dabblet.com)
  6. * @author Lea Verou
  7. */
  8. code[class *= "language-"],
  9. pre[class *= "language-"] {
  10. color: black;
  11. background: none;
  12. text-shadow: 0 1px white;
  13. font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  14. font-size: 1em;
  15. text-align: left;
  16. white-space: pre;
  17. word-spacing: normal;
  18. word-break: normal;
  19. word-wrap: normal;
  20. line-height: 1.5;
  21. -moz-tab-size: 4;
  22. -o-tab-size: 4;
  23. tab-size: 4;
  24. -webkit-hyphens: none;
  25. -moz-hyphens: none;
  26. -ms-hyphens: none;
  27. hyphens: none;
  28. }
  29. pre[class *= "language-"]::-moz-selection,
  30. pre[class *= "language-"] ::-moz-selection,
  31. code[class *= "language-"]::-moz-selection,
  32. code[class *= "language-"] ::-moz-selection {
  33. text-shadow: none;
  34. background: #b3d4fc;
  35. }
  36. pre[class *= "language-"]::selection,
  37. pre[class *= "language-"] ::selection,
  38. code[class *= "language-"]::selection,
  39. code[class *= "language-"] ::selection {
  40. text-shadow: none;
  41. background: #b3d4fc;
  42. }
  43. @media print {
  44. code[class *= "language-"],
  45. pre[class *= "language-"] {
  46. text-shadow: none;
  47. }
  48. }
  49. /* Code blocks */
  50. pre[class *= "language-"] {
  51. padding: 1em;
  52. margin: .5em 0;
  53. overflow: auto;
  54. }
  55. :not(pre) > code[class *= "language-"],
  56. pre[class *= "language-"] {
  57. background: #f5f2f0;
  58. }
  59. /* Inline code */
  60. :not(pre) > code[class *= "language-"] {
  61. padding: .1em;
  62. border-radius: .3em;
  63. white-space: normal;
  64. }
  65. .token.comment,
  66. .token.prolog,
  67. .token.doctype,
  68. .token.cdata {
  69. color: slategray;
  70. }
  71. .token.punctuation {
  72. color: #999;
  73. }
  74. .token.namespace {
  75. opacity: .7;
  76. }
  77. .token.property,
  78. .token.tag,
  79. .token.boolean,
  80. .token.number,
  81. .token.constant,
  82. .token.symbol,
  83. .token.deleted {
  84. color: #905;
  85. }
  86. .token.selector,
  87. .token.attr-name,
  88. .token.string,
  89. .token.char,
  90. .token.builtin,
  91. .token.inserted {
  92. color: #690;
  93. }
  94. .token.operator,
  95. .token.entity,
  96. .token.url,
  97. .language-css .token.string,
  98. .style .token.string {
  99. color: #9a6e3a;
  100. /* This background color was intended by the author of this theme. */
  101. background: hsla(0, 0%, 100%, .5);
  102. }
  103. .token.atrule,
  104. .token.attr-value,
  105. .token.keyword {
  106. color: #07a;
  107. }
  108. .token.function,
  109. .token.class-name {
  110. color: #DD4A68;
  111. }
  112. .token.regex,
  113. .token.important,
  114. .token.variable {
  115. color: #e90;
  116. }
  117. .token.important,
  118. .token.bold {
  119. font-weight: bold;
  120. }
  121. .token.italic {
  122. font-style: italic;
  123. }
  124. .token.entity {
  125. cursor: help;
  126. }
  127. pre[data-line] {
  128. position: relative;
  129. padding: 1em 0 1em 3em;
  130. }
  131. .line-highlight {
  132. position: absolute;
  133. left: 0;
  134. right: 0;
  135. padding: inherit 0;
  136. margin-top: 1em; /* Same as .prism’s padding-top */
  137. background: hsla(24, 20%, 50%, .08);
  138. background: linear-gradient(to right, hsla(24, 20%, 50%, .1) 70%, hsla(24, 20%, 50%, 0));
  139. pointer-events: none;
  140. line-height: inherit;
  141. white-space: pre;
  142. }
  143. .line-highlight:before,
  144. .line-highlight[data-end]:after {
  145. content: attr(data-start);
  146. position: absolute;
  147. top: .4em;
  148. left: .6em;
  149. min-width: 1em;
  150. padding: 0 .5em;
  151. background-color: hsla(24, 20%, 50%, .4);
  152. color: hsl(24, 20%, 95%);
  153. font: bold 65%/1.5 sans-serif;
  154. text-align: center;
  155. vertical-align: .3em;
  156. border-radius: 999px;
  157. text-shadow: none;
  158. box-shadow: 0 1px white;
  159. }
  160. .line-highlight[data-end]:after {
  161. content: attr(data-end);
  162. top: auto;
  163. bottom: .4em;
  164. }
  165. .line-numbers .line-highlight:before,
  166. .line-numbers .line-highlight:after {
  167. content: none;
  168. }
  169. pre[id].linkable-line-numbers span.line-numbers-rows {
  170. pointer-events: all;
  171. }
  172. pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
  173. cursor: pointer;
  174. }
  175. pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
  176. background-color: rgba(128, 128, 128, .2);
  177. }
  178. pre[class *= "language-"].line-numbers {
  179. position: relative;
  180. padding-left: 3.8em;
  181. counter-reset: linenumber;
  182. }
  183. pre[class *= "language-"].line-numbers > code {
  184. position: relative;
  185. white-space: inherit;
  186. }
  187. .line-numbers .line-numbers-rows {
  188. position: absolute;
  189. pointer-events: none;
  190. top: 0;
  191. font-size: 100%;
  192. left: -3.8em;
  193. width: 3em; /* works for line-numbers below 1000 lines */
  194. letter-spacing: -1px;
  195. border-right: 1px solid #999;
  196. -webkit-user-select: none;
  197. -moz-user-select: none;
  198. -ms-user-select: none;
  199. user-select: none;
  200. }
  201. .line-numbers-rows > span {
  202. display: block;
  203. counter-increment: linenumber;
  204. }
  205. .line-numbers-rows > span:before {
  206. content: counter(linenumber);
  207. color: #999;
  208. display: block;
  209. padding-right: 0.8em;
  210. text-align: right;
  211. }