prism-coy.css 3.9 KB

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