prism.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /* PrismJS 1.11.0
  2. http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+python&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. text-align: left;
  15. white-space: pre;
  16. word-spacing: normal;
  17. word-break: normal;
  18. word-wrap: normal;
  19. line-height: 1.5;
  20. -moz-tab-size: 4;
  21. -o-tab-size: 4;
  22. tab-size: 4;
  23. -webkit-hyphens: none;
  24. -moz-hyphens: none;
  25. -ms-hyphens: none;
  26. hyphens: none;
  27. }
  28. pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
  29. code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
  30. text-shadow: none;
  31. background: #b3d4fc;
  32. }
  33. pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
  34. code[class*="language-"]::selection, code[class*="language-"] ::selection {
  35. text-shadow: none;
  36. background: #b3d4fc;
  37. }
  38. @media print {
  39. code[class*="language-"],
  40. pre[class*="language-"] {
  41. text-shadow: none;
  42. }
  43. }
  44. /* Code blocks */
  45. pre[class*="language-"] {
  46. padding: 1em;
  47. margin: .5em 0;
  48. overflow: auto;
  49. }
  50. :not(pre) > code[class*="language-"],
  51. pre[class*="language-"] {
  52. background: #f5f2f0;
  53. }
  54. /* Inline code */
  55. :not(pre) > code[class*="language-"] {
  56. padding: .1em;
  57. border-radius: .3em;
  58. white-space: normal;
  59. }
  60. .token.comment,
  61. .token.prolog,
  62. .token.doctype,
  63. .token.cdata {
  64. color: slategray;
  65. }
  66. .token.punctuation {
  67. color: #999;
  68. }
  69. .namespace {
  70. opacity: .7;
  71. }
  72. .token.property,
  73. .token.tag,
  74. .token.boolean,
  75. .token.number,
  76. .token.constant,
  77. .token.symbol,
  78. .token.deleted {
  79. color: #905;
  80. }
  81. .token.selector,
  82. .token.attr-name,
  83. .token.string,
  84. .token.char,
  85. .token.builtin,
  86. .token.inserted {
  87. color: #690;
  88. }
  89. .token.operator,
  90. .token.entity,
  91. .token.url,
  92. .language-css .token.string,
  93. .style .token.string {
  94. color: #a67f59;
  95. background: hsla(0, 0%, 100%, .5);
  96. }
  97. .token.atrule,
  98. .token.attr-value,
  99. .token.keyword {
  100. color: #07a;
  101. }
  102. .token.function {
  103. color: #DD4A68;
  104. }
  105. .token.regex,
  106. .token.important,
  107. .token.variable {
  108. color: #e90;
  109. }
  110. .token.important,
  111. .token.bold {
  112. font-weight: bold;
  113. }
  114. .token.italic {
  115. font-style: italic;
  116. }
  117. .token.entity {
  118. cursor: help;
  119. }
  120. pre[data-line] {
  121. position: relative;
  122. padding: 1em 0 1em 3em;
  123. }
  124. .line-highlight {
  125. position: absolute;
  126. left: 0;
  127. right: 0;
  128. padding: inherit 0;
  129. margin-top: 1em; /* Same as .prism’s padding-top */
  130. background: hsla(24, 20%, 50%,.08);
  131. background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  132. pointer-events: none;
  133. line-height: inherit;
  134. white-space: pre;
  135. }
  136. .line-highlight:before,
  137. .line-highlight[data-end]:after {
  138. content: attr(data-start);
  139. position: absolute;
  140. top: .4em;
  141. left: .6em;
  142. min-width: 1em;
  143. padding: 0 .5em;
  144. background-color: hsla(24, 20%, 50%,.4);
  145. color: hsl(24, 20%, 95%);
  146. font: bold 65%/1.5 sans-serif;
  147. text-align: center;
  148. vertical-align: .3em;
  149. border-radius: 999px;
  150. text-shadow: none;
  151. box-shadow: 0 1px white;
  152. }
  153. .line-highlight[data-end]:after {
  154. content: attr(data-end);
  155. top: auto;
  156. bottom: .4em;
  157. }
  158. .line-numbers .line-highlight:before,
  159. .line-numbers .line-highlight:after {
  160. content: none;
  161. }
  162. pre.line-numbers {
  163. position: relative;
  164. padding-left: 3.8em;
  165. counter-reset: linenumber;
  166. }
  167. pre.line-numbers > code {
  168. position: relative;
  169. white-space: inherit;
  170. }
  171. .line-numbers .line-numbers-rows {
  172. position: absolute;
  173. pointer-events: none;
  174. top: 0;
  175. font-size: 100%;
  176. left: -3.8em;
  177. width: 3em; /* works for line-numbers below 1000 lines */
  178. letter-spacing: -1px;
  179. border-right: 1px solid #999;
  180. -webkit-user-select: none;
  181. -moz-user-select: none;
  182. -ms-user-select: none;
  183. user-select: none;
  184. }
  185. .line-numbers-rows > span {
  186. pointer-events: none;
  187. display: block;
  188. counter-increment: linenumber;
  189. }
  190. .line-numbers-rows > span:before {
  191. content: counter(linenumber);
  192. color: #999;
  193. display: block;
  194. padding-right: 0.8em;
  195. text-align: right;
  196. }