prism.css 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. /* PrismJS 1.15.0
  2. https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+c+csharp+bash+cpp+aspnet+ruby+markup-templating+go+markdown+php+python+sass+yaml&plugins=line-highlight+line-numbers+toolbar+highlight-keywords+show-language+copy-to-clipboard */
  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: #9a6e3a;
  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. .token.class-name {
  104. color: #DD4A68;
  105. }
  106. .token.regex,
  107. .token.important,
  108. .token.variable {
  109. color: #e90;
  110. }
  111. .token.important,
  112. .token.bold {
  113. font-weight: bold;
  114. }
  115. .token.italic {
  116. font-style: italic;
  117. }
  118. .token.entity {
  119. cursor: help;
  120. }
  121. pre[data-line] {
  122. position: relative;
  123. padding: 1em 0 1em 3em;
  124. }
  125. .line-highlight {
  126. position: absolute;
  127. left: 0;
  128. right: 0;
  129. padding: inherit 0;
  130. margin-top: 1em; /* Same as .prism’s padding-top */
  131. background: hsla(24, 20%, 50%,.08);
  132. background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  133. pointer-events: none;
  134. line-height: inherit;
  135. white-space: pre;
  136. }
  137. .line-highlight:before,
  138. .line-highlight[data-end]:after {
  139. content: attr(data-start);
  140. position: absolute;
  141. top: .4em;
  142. left: .6em;
  143. min-width: 1em;
  144. padding: 0 .5em;
  145. background-color: hsla(24, 20%, 50%,.4);
  146. color: hsl(24, 20%, 95%);
  147. font: bold 65%/1.5 sans-serif;
  148. text-align: center;
  149. vertical-align: .3em;
  150. border-radius: 999px;
  151. text-shadow: none;
  152. box-shadow: 0 1px white;
  153. }
  154. .line-highlight[data-end]:after {
  155. content: attr(data-end);
  156. top: auto;
  157. bottom: .4em;
  158. }
  159. .line-numbers .line-highlight:before,
  160. .line-numbers .line-highlight:after {
  161. content: none;
  162. }
  163. pre[class*="language-"].line-numbers {
  164. position: relative;
  165. padding-left: 3.8em;
  166. counter-reset: linenumber;
  167. }
  168. pre[class*="language-"].line-numbers > code {
  169. position: relative;
  170. white-space: inherit;
  171. }
  172. .line-numbers .line-numbers-rows {
  173. position: absolute;
  174. pointer-events: none;
  175. top: 0;
  176. font-size: 100%;
  177. left: -3.8em;
  178. width: 3em; /* works for line-numbers below 1000 lines */
  179. letter-spacing: -1px;
  180. border-right: 1px solid #999;
  181. -webkit-user-select: none;
  182. -moz-user-select: none;
  183. -ms-user-select: none;
  184. user-select: none;
  185. }
  186. .line-numbers-rows > span {
  187. pointer-events: none;
  188. display: block;
  189. counter-increment: linenumber;
  190. }
  191. .line-numbers-rows > span:before {
  192. content: counter(linenumber);
  193. color: #999;
  194. display: block;
  195. padding-right: 0.8em;
  196. text-align: right;
  197. }
  198. div.code-toolbar {
  199. position: relative;
  200. }
  201. div.code-toolbar > .toolbar {
  202. position: absolute;
  203. top: .3em;
  204. right: .2em;
  205. transition: opacity 0.3s ease-in-out;
  206. opacity: 0;
  207. }
  208. div.code-toolbar:hover > .toolbar {
  209. opacity: 1;
  210. }
  211. div.code-toolbar > .toolbar .toolbar-item {
  212. display: inline-block;
  213. }
  214. div.code-toolbar > .toolbar a {
  215. cursor: pointer;
  216. }
  217. div.code-toolbar > .toolbar button {
  218. background: none;
  219. border: 0;
  220. color: inherit;
  221. font: inherit;
  222. line-height: normal;
  223. overflow: visible;
  224. padding: 0;
  225. -webkit-user-select: none; /* for button */
  226. -moz-user-select: none;
  227. -ms-user-select: none;
  228. }
  229. div.code-toolbar > .toolbar a,
  230. div.code-toolbar > .toolbar button,
  231. div.code-toolbar > .toolbar span {
  232. color: #bbb;
  233. font-size: .8em;
  234. padding: 0 .5em;
  235. background: #f5f2f0;
  236. background: rgba(224, 224, 224, 0.2);
  237. box-shadow: 0 2px 0 0 rgba(0,0,0,0.2);
  238. border-radius: .5em;
  239. }
  240. div.code-toolbar > .toolbar a:hover,
  241. div.code-toolbar > .toolbar a:focus,
  242. div.code-toolbar > .toolbar button:hover,
  243. div.code-toolbar > .toolbar button:focus,
  244. div.code-toolbar > .toolbar span:hover,
  245. div.code-toolbar > .toolbar span:focus {
  246. color: inherit;
  247. text-decoration: none;
  248. }