prism.css 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /* PrismJS 1.28.0
  2. https://prismjs.com/download.html#themes=prism-coy&languages=markup+css+clike+javascript+python+sql+visual-basic&plugins=line-numbers+normalize-whitespace */
  3. /**
  4. * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
  5. * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);
  6. * @author Tim Shedor
  7. */
  8. code[class*="language-"],
  9. pre[class*="language-"] {
  10. color: black;
  11. background: none;
  12. font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  13. font-size: 1em;
  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. /* Code blocks */
  29. pre[class*="language-"] {
  30. position: relative;
  31. margin: .5em 0;
  32. overflow: visible;
  33. padding: 1px;
  34. }
  35. pre[class*="language-"] > code {
  36. position: relative;
  37. z-index: 1;
  38. border-left: 10px solid #358ccb;
  39. box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
  40. background-color: #fdfdfd;
  41. background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  42. background-size: 3em 3em;
  43. background-origin: content-box;
  44. background-attachment: local;
  45. }
  46. code[class*="language-"] {
  47. max-height: inherit;
  48. height: inherit;
  49. padding: 0 1em;
  50. display: block;
  51. overflow: auto;
  52. }
  53. /* Margin bottom to accommodate shadow */
  54. :not(pre) > code[class*="language-"],
  55. pre[class*="language-"] {
  56. background-color: #fdfdfd;
  57. -webkit-box-sizing: border-box;
  58. -moz-box-sizing: border-box;
  59. box-sizing: border-box;
  60. margin-bottom: 1em;
  61. }
  62. /* Inline code */
  63. :not(pre) > code[class*="language-"] {
  64. position: relative;
  65. padding: .2em;
  66. border-radius: 0.3em;
  67. color: #c92c2c;
  68. border: 1px solid rgba(0, 0, 0, 0.1);
  69. display: inline;
  70. white-space: normal;
  71. }
  72. pre[class*="language-"]:before,
  73. pre[class*="language-"]:after {
  74. content: '';
  75. display: block;
  76. position: absolute;
  77. bottom: 0.75em;
  78. left: 0.18em;
  79. width: 40%;
  80. height: 20%;
  81. max-height: 13em;
  82. box-shadow: 0px 13px 8px #979797;
  83. -webkit-transform: rotate(-2deg);
  84. -moz-transform: rotate(-2deg);
  85. -ms-transform: rotate(-2deg);
  86. -o-transform: rotate(-2deg);
  87. transform: rotate(-2deg);
  88. }
  89. pre[class*="language-"]:after {
  90. right: 0.75em;
  91. left: auto;
  92. -webkit-transform: rotate(2deg);
  93. -moz-transform: rotate(2deg);
  94. -ms-transform: rotate(2deg);
  95. -o-transform: rotate(2deg);
  96. transform: rotate(2deg);
  97. }
  98. .token.comment,
  99. .token.block-comment,
  100. .token.prolog,
  101. .token.doctype,
  102. .token.cdata {
  103. color: #7D8B99;
  104. }
  105. .token.punctuation {
  106. color: #5F6364;
  107. }
  108. .token.property,
  109. .token.tag,
  110. .token.boolean,
  111. .token.number,
  112. .token.function-name,
  113. .token.constant,
  114. .token.symbol,
  115. .token.deleted {
  116. color: #c92c2c;
  117. }
  118. .token.selector,
  119. .token.attr-name,
  120. .token.string,
  121. .token.char,
  122. .token.function,
  123. .token.builtin,
  124. .token.inserted {
  125. color: #2f9c0a;
  126. }
  127. .token.operator,
  128. .token.entity,
  129. .token.url,
  130. .token.variable {
  131. color: #a67f59;
  132. background: rgba(255, 255, 255, 0.5);
  133. }
  134. .token.atrule,
  135. .token.attr-value,
  136. .token.keyword,
  137. .token.class-name {
  138. color: #1990b8;
  139. }
  140. .token.regex,
  141. .token.important {
  142. color: #e90;
  143. }
  144. .language-css .token.string,
  145. .style .token.string {
  146. color: #a67f59;
  147. background: rgba(255, 255, 255, 0.5);
  148. }
  149. .token.important {
  150. font-weight: normal;
  151. }
  152. .token.bold {
  153. font-weight: bold;
  154. }
  155. .token.italic {
  156. font-style: italic;
  157. }
  158. .token.entity {
  159. cursor: help;
  160. }
  161. .token.namespace {
  162. opacity: .7;
  163. }
  164. @media screen and (max-width: 767px) {
  165. pre[class*="language-"]:before,
  166. pre[class*="language-"]:after {
  167. bottom: 14px;
  168. box-shadow: none;
  169. }
  170. }
  171. /* Plugin styles: Line Numbers */
  172. pre[class*="language-"].line-numbers.line-numbers {
  173. padding-left: 0;
  174. }
  175. pre[class*="language-"].line-numbers.line-numbers code {
  176. padding-left: 3.8em;
  177. }
  178. pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows {
  179. left: 0;
  180. }
  181. /* Plugin styles: Line Highlight */
  182. pre[class*="language-"][data-line] {
  183. padding-top: 0;
  184. padding-bottom: 0;
  185. padding-left: 0;
  186. }
  187. pre[data-line] code {
  188. position: relative;
  189. padding-left: 4em;
  190. }
  191. pre .line-highlight {
  192. margin-top: 0;
  193. }
  194. pre[class*="language-"].line-numbers {
  195. position: relative;
  196. padding-left: 3.8em;
  197. counter-reset: linenumber;
  198. }
  199. pre[class*="language-"].line-numbers > code {
  200. position: relative;
  201. white-space: inherit;
  202. }
  203. .line-numbers .line-numbers-rows {
  204. position: absolute;
  205. pointer-events: none;
  206. top: 0;
  207. font-size: 100%;
  208. left: -3.8em;
  209. width: 3em; /* works for line-numbers below 1000 lines */
  210. letter-spacing: -1px;
  211. border-right: 1px solid #999;
  212. -webkit-user-select: none;
  213. -moz-user-select: none;
  214. -ms-user-select: none;
  215. user-select: none;
  216. }
  217. .line-numbers-rows > span {
  218. display: block;
  219. counter-increment: linenumber;
  220. }
  221. .line-numbers-rows > span:before {
  222. content: counter(linenumber);
  223. color: #999;
  224. display: block;
  225. padding-right: 0.8em;
  226. text-align: right;
  227. }