prism-coy.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /**
  2. * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
  3. * 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);
  4. * @author Tim Shedor
  5. */
  6. code[class*="language-"],
  7. pre[class*="language-"] {
  8. color: black;
  9. font-family: Consolas, Monaco, 'Andale Mono', monospace;
  10. direction: ltr;
  11. text-align: left;
  12. white-space: pre;
  13. word-spacing: normal;
  14. word-break: normal;
  15. line-height: 1.5;
  16. -moz-tab-size: 4;
  17. -o-tab-size: 4;
  18. tab-size: 4;
  19. -webkit-hyphens: none;
  20. -moz-hyphens: none;
  21. -ms-hyphens: none;
  22. hyphens: none;
  23. }
  24. /* Code blocks */
  25. pre[class*="language-"] {
  26. position: relative;
  27. margin: .5em 0;
  28. -webkit-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
  29. -moz-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
  30. box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
  31. border-left: 10px solid #358ccb;
  32. background-color: #fdfdfd;
  33. background-image: -webkit-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  34. background-image: -moz-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  35. background-image: -ms-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  36. background-image: -o-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  37. background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
  38. background-size: 3em 3em;
  39. background-origin: content-box;
  40. overflow: visible;
  41. max-height: 30em;
  42. }
  43. code[class*="language"] {
  44. max-height: inherit;
  45. height: 100%;
  46. padding: 0 1em;
  47. display: block;
  48. overflow: auto;
  49. }
  50. /* Margin bottom to accomodate shadow */
  51. :not(pre) > code[class*="language-"],
  52. pre[class*="language-"] {
  53. background-color: #fdfdfd;
  54. -webkit-box-sizing: border-box;
  55. -moz-box-sizing: border-box;
  56. box-sizing: border-box;
  57. margin-bottom: 1em;
  58. }
  59. /* Inline code */
  60. :not(pre) > code[class*="language-"] {
  61. position: relative;
  62. padding: .2em;
  63. -webkit-border-radius: 0.3em;
  64. -moz-border-radius: 0.3em;
  65. -ms-border-radius: 0.3em;
  66. -o-border-radius: 0.3em;
  67. border-radius: 0.3em;
  68. color: #c92c2c;
  69. border: 1px solid rgba(0, 0, 0, 0.1);
  70. }
  71. pre[class*="language-"]:before,
  72. pre[class*="language-"]:after {
  73. content: '';
  74. z-index: -2;
  75. display: block;
  76. position: absolute;
  77. bottom: 0.75em;
  78. left: 0.18em;
  79. width: 40%;
  80. height: 20%;
  81. -webkit-box-shadow: 0px 13px 8px #979797;
  82. -moz-box-shadow: 0px 13px 8px #979797;
  83. box-shadow: 0px 13px 8px #979797;
  84. -webkit-transform: rotate(-2deg);
  85. -moz-transform: rotate(-2deg);
  86. -ms-transform: rotate(-2deg);
  87. -o-transform: rotate(-2deg);
  88. transform: rotate(-2deg);
  89. }
  90. :not(pre) > code[class*="language-"]:after,
  91. pre[class*="language-"]:after {
  92. right: 0.75em;
  93. left: auto;
  94. -webkit-transform: rotate(2deg);
  95. -moz-transform: rotate(2deg);
  96. -ms-transform: rotate(2deg);
  97. -o-transform: rotate(2deg);
  98. transform: rotate(2deg);
  99. }
  100. .token.comment,
  101. .token.block-comment,
  102. .token.prolog,
  103. .token.doctype,
  104. .token.cdata {
  105. color: #7D8B99;
  106. }
  107. .token.punctuation {
  108. color: #5F6364;
  109. }
  110. .token.property,
  111. .token.tag,
  112. .token.boolean,
  113. .token.number,
  114. .token.function-name,
  115. .token.constant,
  116. .token.symbol,
  117. .token.deleted {
  118. color: #c92c2c;
  119. }
  120. .token.selector,
  121. .token.attr-name,
  122. .token.string,
  123. .token.char,
  124. .token.function,
  125. .token.builtin,
  126. .token.inserted {
  127. color: #2f9c0a;
  128. }
  129. .token.operator,
  130. .token.entity,
  131. .token.url,
  132. .token.variable {
  133. color: #a67f59;
  134. background: rgba(255, 255, 255, 0.5);
  135. }
  136. .token.atrule,
  137. .token.attr-value,
  138. .token.keyword,
  139. .token.class-name {
  140. color: #1990b8;
  141. }
  142. .token.regex,
  143. .token.important {
  144. color: #e90;
  145. }
  146. .language-css .token.string,
  147. .style .token.string {
  148. color: #a67f59;
  149. background: rgba(255, 255, 255, 0.5);
  150. }
  151. .token.important {
  152. font-weight: normal;
  153. }
  154. .token.bold {
  155. font-weight: bold;
  156. }
  157. .token.italic {
  158. font-style: italic;
  159. }
  160. .token.entity {
  161. cursor: help;
  162. }
  163. .namespace {
  164. opacity: .7;
  165. }
  166. @media screen and (max-width: 767px) {
  167. pre[class*="language-"]:before,
  168. pre[class*="language-"]:after {
  169. bottom: 14px;
  170. -webkit-box-shadow: none;
  171. -moz-box-shadow: none;
  172. box-shadow: none;
  173. }
  174. }
  175. /* Plugin styles */
  176. .token.tab:not(:empty):before,
  177. .token.cr:before,
  178. .token.lf:before {
  179. color: #e0d7d1;
  180. }
  181. /* Plugin styles: Line Numbers */
  182. pre[class*="language-"].line-numbers {
  183. padding-left: 0;
  184. }
  185. pre[class*="language-"].line-numbers code {
  186. padding-left: 3.8em;
  187. }
  188. pre[class*="language-"].line-numbers .line-numbers-rows {
  189. left: 0;
  190. }
  191. /* Plugin styles: Line Highlight */
  192. pre[class*="language-"][data-line] {
  193. padding-top: 0;
  194. padding-bottom: 0;
  195. padding-left: 0;
  196. }
  197. pre[data-line] code {
  198. position: relative;
  199. padding-left: 4em;
  200. }
  201. pre .line-highlight {
  202. margin-top: 0;
  203. }