editormd.preview.scss 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. @charset "UTF-8";
  2. @import "lib/variables";
  3. @import "lib/prefixes";
  4. @import "font-awesome";
  5. @import "editormd.logo";
  6. // github-markdown.css
  7. @import "github-markdown";
  8. #{$prefix}preview-container, #{$prefix}html-preview {
  9. text-align: left;
  10. font-size: 14px;
  11. line-height: 1.6;
  12. padding: 20px;
  13. overflow: auto;
  14. width: 100%;
  15. background-color: #fff;
  16. blockquote {
  17. color: $color;
  18. border-left: 4px solid $borderColor;
  19. padding-left: 20px;
  20. margin-left: 0;
  21. font-size: 14px;
  22. font-style: italic;
  23. }
  24. p code {
  25. margin-left: 5px;
  26. margin-right: 4px;
  27. }
  28. abbr {
  29. background: #ffffdd;
  30. }
  31. hr {
  32. height: 1px;
  33. border: none;
  34. border-top: 1px solid $borderColor;
  35. background: none;
  36. }
  37. code {
  38. border: 1px solid $borderColor;
  39. background: #f6f6f6;
  40. padding: 3px;
  41. border-radius: 3px;
  42. font-size: 14px;
  43. }
  44. pre {
  45. border: 1px solid $borderColor;
  46. background: #f6f6f6;
  47. padding: 10px;
  48. @include border-radius(3px);
  49. code {
  50. padding: 0;
  51. }
  52. }
  53. pre, code, kbd {
  54. font-family: "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
  55. }
  56. table thead tr {
  57. background-color: #F8F8F8;
  58. }
  59. .markdown-toc {
  60. }
  61. .markdown-toc-list {
  62. }
  63. p#{$prefix}tex {
  64. text-align: center;
  65. }
  66. span#{$prefix}tex {
  67. margin: 0 5px;
  68. }
  69. .emoji {
  70. width: 24px;
  71. height: 24px;
  72. }
  73. .katex {
  74. font-size: 1.4em;
  75. }
  76. .sequence-diagram, .flowchart {
  77. margin: 0 auto;
  78. text-align: center;
  79. svg {
  80. margin: 0 auto;
  81. }
  82. text {
  83. font-size : 15px !important;
  84. font-family: "YaHei Consolas Hybrid", Consolas, "Microsoft YaHei", "Malgun Gothic", "Segoe UI", Helvetica, Arial !important;
  85. }
  86. }
  87. }
  88. //Pretty printing styles. Used with prettify.js.
  89. @import "prettify";
  90. #{$prefix}preview-container, #{$prefix}html-preview {
  91. pre.prettyprint {
  92. padding: 10px;
  93. border: 1px solid $borderColor;
  94. white-space: pre-wrap;
  95. word-wrap: break-word;
  96. }
  97. ol.linenums {
  98. color: #999;
  99. padding-left: 2.5em;
  100. li {
  101. list-style-type: decimal;
  102. code {
  103. border: none;
  104. background:none;
  105. padding: 0;
  106. }
  107. }
  108. }
  109. }
  110. #{$prefix}preview-container, #{$prefix}html-preview {
  111. #{$prefix}toc-menu {
  112. margin: 8px 0 12px 0;
  113. display: inline-block;
  114. > .markdown-toc {
  115. position: relative;
  116. @include border-radius(4px);
  117. border: 1px solid #ddd;
  118. display: inline-block;
  119. font-size: 1em;
  120. > ul {
  121. width : 160%;
  122. min-width: 180px;
  123. position: absolute;
  124. left: -1px;
  125. top: -2px;
  126. z-index: 100;
  127. padding: 0 10px 10px;
  128. display: none;
  129. background: #fff;
  130. border: 1px solid #ddd;
  131. @include border-radius(4px);
  132. @include box-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  133. > li ul {
  134. width: 100%;
  135. min-width: 180px;
  136. border: 1px solid #ddd;
  137. display: none;
  138. background: #fff;
  139. @include border-radius(4px);
  140. }
  141. > li a {
  142. color: #666;
  143. padding: 6px 10px;
  144. display: block;
  145. @include transition(background-color 500ms ease-out);
  146. &:hover {
  147. background-color: #f6f6f6;
  148. }
  149. }
  150. }
  151. li {
  152. position: relative;
  153. > ul {
  154. position: absolute;
  155. top: 32px;
  156. left: 10%;
  157. display: none;
  158. @include box-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  159. &:before, &:after {
  160. pointer-events: pointer-events;
  161. position: absolute;
  162. left: 15px;
  163. top: -6px;
  164. display: block;
  165. content: "";
  166. width: 0;
  167. height: 0;
  168. border: 6px solid transparent;
  169. border-width: 0 6px 6px;
  170. z-index: 10;
  171. }
  172. &:before {
  173. border-bottom-color: #ccc;
  174. }
  175. &:after {
  176. border-bottom-color: #ffffff;
  177. top: -5px;
  178. }
  179. }
  180. }
  181. }
  182. ul {
  183. list-style: none;
  184. }
  185. a {
  186. text-decoration: none;
  187. }
  188. h1 {
  189. font-size: 16px;
  190. padding: 5px 0 10px 10px;
  191. line-height: 1;
  192. border-bottom: 1px solid #eee;
  193. .fa {
  194. padding-left: 10px;
  195. }
  196. }
  197. .toc-menu-btn {
  198. color: #666;
  199. min-width: 180px;
  200. padding: 5px 10px;
  201. border-radius: 4px;
  202. display: inline-block;
  203. @include transition(background-color 500ms ease-out);
  204. &:hover {
  205. background-color: #f6f6f6;
  206. }
  207. .fa {
  208. float: right;
  209. padding: 3px 0 0 10px;
  210. font-size: 1.3em;
  211. }
  212. }
  213. }
  214. }
  215. .markdown-body {
  216. #{$prefix}toc-menu {
  217. ul {
  218. padding-left: 0;
  219. }
  220. }
  221. .highlight pre, pre {
  222. line-height: 1.6;
  223. }
  224. }
  225. hr.editormd-page-break {
  226. border: 1px dotted #ccc;
  227. font-size: 0;
  228. height: 2px;
  229. }
  230. @media only print {
  231. hr.editormd-page-break {
  232. background: none;
  233. border: none;
  234. height: 0;
  235. }
  236. }
  237. #{$prefix}html-preview {
  238. textarea {
  239. display : none;
  240. }
  241. hr.editormd-page-break {
  242. background: none;
  243. border: none;
  244. height: 0;
  245. }
  246. }
  247. #{$prefix}preview-close-btn {
  248. color: #fff;
  249. padding: 4px 6px;
  250. font-size: 18px;
  251. @include border-radius(500px);
  252. display: none;
  253. background-color: #ccc;
  254. position: absolute;
  255. top: 25px;
  256. right: 35px;
  257. z-index: 19;
  258. @include transition(background-color 300ms ease-out);
  259. &:hover {
  260. background-color: #999;
  261. }
  262. }
  263. .editormd-preview-active {
  264. width: 100%;
  265. padding: 40px;
  266. }