mocha.css 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. @charset "utf-8";
  2. body {
  3. margin:0;
  4. }
  5. #mocha {
  6. font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  7. margin: 60px 50px;
  8. }
  9. #mocha ul,
  10. #mocha li {
  11. margin: 0;
  12. padding: 0;
  13. }
  14. #mocha ul {
  15. list-style: none;
  16. }
  17. #mocha h1,
  18. #mocha h2 {
  19. margin: 0;
  20. }
  21. #mocha h1 {
  22. margin-top: 15px;
  23. font-size: 1em;
  24. font-weight: 200;
  25. }
  26. #mocha h1 a {
  27. text-decoration: none;
  28. color: inherit;
  29. }
  30. #mocha h1 a:hover {
  31. text-decoration: underline;
  32. }
  33. #mocha .suite .suite h1 {
  34. margin-top: 0;
  35. font-size: .8em;
  36. }
  37. #mocha .hidden {
  38. display: none;
  39. }
  40. #mocha h2 {
  41. font-size: 12px;
  42. font-weight: normal;
  43. cursor: pointer;
  44. }
  45. #mocha .suite {
  46. margin-left: 15px;
  47. }
  48. #mocha .test {
  49. margin-left: 15px;
  50. overflow: hidden;
  51. }
  52. #mocha .test.pending:hover h2::after {
  53. content: '(pending)';
  54. font-family: arial, sans-serif;
  55. }
  56. #mocha .test.pass.medium .duration {
  57. background: #c09853;
  58. }
  59. #mocha .test.pass.slow .duration {
  60. background: #b94a48;
  61. }
  62. #mocha .test.pass::before {
  63. content: '✓';
  64. font-size: 12px;
  65. display: block;
  66. float: left;
  67. margin-right: 5px;
  68. color: #00d6b2;
  69. }
  70. #mocha .test.pass .duration {
  71. font-size: 9px;
  72. margin-left: 5px;
  73. padding: 2px 5px;
  74. color: #fff;
  75. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
  76. -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
  77. box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
  78. -webkit-border-radius: 5px;
  79. -moz-border-radius: 5px;
  80. -ms-border-radius: 5px;
  81. -o-border-radius: 5px;
  82. border-radius: 5px;
  83. }
  84. #mocha .test.pass.fast .duration {
  85. display: none;
  86. }
  87. #mocha .test.pending {
  88. color: #0b97c4;
  89. }
  90. #mocha .test.pending::before {
  91. content: '◦';
  92. color: #0b97c4;
  93. }
  94. #mocha .test.fail {
  95. color: #c00;
  96. }
  97. #mocha .test.fail pre {
  98. color: black;
  99. }
  100. #mocha .test.fail::before {
  101. content: '✖';
  102. font-size: 12px;
  103. display: block;
  104. float: left;
  105. margin-right: 5px;
  106. color: #c00;
  107. }
  108. #mocha .test pre.error {
  109. color: #c00;
  110. max-height: 300px;
  111. overflow: auto;
  112. }
  113. #mocha .test .html-error {
  114. overflow: auto;
  115. color: black;
  116. line-height: 1.5;
  117. display: block;
  118. float: left;
  119. clear: left;
  120. font: 12px/1.5 monaco, monospace;
  121. margin: 5px;
  122. padding: 15px;
  123. border: 1px solid #eee;
  124. max-width: 85%; /*(1)*/
  125. max-width: calc(100% - 42px); /*(2)*/
  126. max-height: 300px;
  127. word-wrap: break-word;
  128. border-bottom-color: #ddd;
  129. -webkit-border-radius: 3px;
  130. -webkit-box-shadow: 0 1px 3px #eee;
  131. -moz-border-radius: 3px;
  132. -moz-box-shadow: 0 1px 3px #eee;
  133. border-radius: 3px;
  134. }
  135. #mocha .test .html-error pre.error {
  136. border: none;
  137. -webkit-border-radius: none;
  138. -webkit-box-shadow: none;
  139. -moz-border-radius: none;
  140. -moz-box-shadow: none;
  141. padding: 0;
  142. margin: 0;
  143. margin-top: 18px;
  144. max-height: none;
  145. }
  146. /**
  147. * (1): approximate for browsers not supporting calc
  148. * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
  149. * ^^ seriously
  150. */
  151. #mocha .test pre {
  152. display: block;
  153. float: left;
  154. clear: left;
  155. font: 12px/1.5 monaco, monospace;
  156. margin: 5px;
  157. padding: 15px;
  158. border: 1px solid #eee;
  159. max-width: 85%; /*(1)*/
  160. max-width: calc(100% - 42px); /*(2)*/
  161. word-wrap: break-word;
  162. border-bottom-color: #ddd;
  163. -webkit-border-radius: 3px;
  164. -webkit-box-shadow: 0 1px 3px #eee;
  165. -moz-border-radius: 3px;
  166. -moz-box-shadow: 0 1px 3px #eee;
  167. border-radius: 3px;
  168. }
  169. #mocha .test h2 {
  170. position: relative;
  171. }
  172. #mocha .test a.replay {
  173. position: absolute;
  174. top: 3px;
  175. right: 0;
  176. text-decoration: none;
  177. vertical-align: middle;
  178. display: block;
  179. width: 15px;
  180. height: 15px;
  181. line-height: 15px;
  182. text-align: center;
  183. background: #eee;
  184. font-size: 15px;
  185. -moz-border-radius: 15px;
  186. border-radius: 15px;
  187. -webkit-transition: opacity 200ms;
  188. -moz-transition: opacity 200ms;
  189. transition: opacity 200ms;
  190. opacity: 0.3;
  191. color: #888;
  192. }
  193. #mocha .test:hover a.replay {
  194. opacity: 1;
  195. }
  196. #mocha-report.pass .test.fail {
  197. display: none;
  198. }
  199. #mocha-report.fail .test.pass {
  200. display: none;
  201. }
  202. #mocha-report.pending .test.pass,
  203. #mocha-report.pending .test.fail {
  204. display: none;
  205. }
  206. #mocha-report.pending .test.pass.pending {
  207. display: block;
  208. }
  209. #mocha-error {
  210. color: #c00;
  211. font-size: 1.5em;
  212. font-weight: 100;
  213. letter-spacing: 1px;
  214. }
  215. #mocha-stats {
  216. position: fixed;
  217. top: 15px;
  218. right: 10px;
  219. font-size: 12px;
  220. margin: 0;
  221. color: #888;
  222. z-index: 1;
  223. }
  224. #mocha-stats .progress {
  225. float: right;
  226. padding-top: 0;
  227. }
  228. #mocha-stats em {
  229. color: black;
  230. }
  231. #mocha-stats a {
  232. text-decoration: none;
  233. color: inherit;
  234. }
  235. #mocha-stats a:hover {
  236. border-bottom: 1px solid #eee;
  237. }
  238. #mocha-stats li {
  239. display: inline-block;
  240. margin: 0 5px;
  241. list-style: none;
  242. padding-top: 11px;
  243. }
  244. #mocha-stats canvas {
  245. width: 40px;
  246. height: 40px;
  247. }
  248. #mocha code .comment { color: #ddd; }
  249. #mocha code .init { color: #2f6fad; }
  250. #mocha code .string { color: #5890ad; }
  251. #mocha code .keyword { color: #8a6343; }
  252. #mocha code .number { color: #2f6fad; }
  253. @media screen and (max-device-width: 480px) {
  254. #mocha {
  255. margin: 60px 0px;
  256. }
  257. #mocha #stats {
  258. position: absolute;
  259. }
  260. }