simplemde.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. /**
  2. * safe-simplemde v0.1.0
  3. * Copyright
  4. * @link https://github.com/wrnice/safe-simplemde
  5. * @license MIT
  6. */
  7. /* BASICS */
  8. .CodeMirror {
  9. /* Set height, width, borders, and global font properties here */
  10. font-family: monospace;
  11. height: 300px;
  12. color: black;
  13. direction: ltr;
  14. }
  15. /* PADDING */
  16. .CodeMirror-lines {
  17. padding: 4px 0; /* Vertical padding around content */
  18. }
  19. .CodeMirror pre {
  20. padding: 0 4px; /* Horizontal padding of content */
  21. }
  22. .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  23. background-color: white; /* The little square between H and V scrollbars */
  24. }
  25. /* GUTTER */
  26. .CodeMirror-gutters {
  27. border-right: 1px solid #ddd;
  28. background-color: #f7f7f7;
  29. white-space: nowrap;
  30. }
  31. .CodeMirror-linenumbers {}
  32. .CodeMirror-linenumber {
  33. padding: 0 3px 0 5px;
  34. min-width: 20px;
  35. text-align: right;
  36. color: #999;
  37. white-space: nowrap;
  38. }
  39. .CodeMirror-guttermarker { color: black; }
  40. .CodeMirror-guttermarker-subtle { color: #999; }
  41. /* CURSOR */
  42. .CodeMirror-cursor {
  43. border-left: 1px solid black;
  44. border-right: none;
  45. width: 0;
  46. }
  47. /* Shown when moving in bi-directional text */
  48. .CodeMirror div.CodeMirror-secondarycursor {
  49. border-left: 1px solid silver;
  50. }
  51. .cm-fat-cursor .CodeMirror-cursor {
  52. width: auto;
  53. border: 0 !important;
  54. background: #7e7;
  55. }
  56. .cm-fat-cursor div.CodeMirror-cursors {
  57. z-index: 1;
  58. }
  59. .cm-fat-cursor-mark {
  60. background-color: rgba(20, 255, 20, 0.5);
  61. -webkit-animation: blink 1.06s steps(1) infinite;
  62. -moz-animation: blink 1.06s steps(1) infinite;
  63. animation: blink 1.06s steps(1) infinite;
  64. }
  65. .cm-animate-fat-cursor {
  66. width: auto;
  67. border: 0;
  68. -webkit-animation: blink 1.06s steps(1) infinite;
  69. -moz-animation: blink 1.06s steps(1) infinite;
  70. animation: blink 1.06s steps(1) infinite;
  71. background-color: #7e7;
  72. }
  73. @-moz-keyframes blink {
  74. 0% {}
  75. 50% { background-color: transparent; }
  76. 100% {}
  77. }
  78. @-webkit-keyframes blink {
  79. 0% {}
  80. 50% { background-color: transparent; }
  81. 100% {}
  82. }
  83. @keyframes blink {
  84. 0% {}
  85. 50% { background-color: transparent; }
  86. 100% {}
  87. }
  88. /* Can style cursor different in overwrite (non-insert) mode */
  89. .CodeMirror-overwrite .CodeMirror-cursor {}
  90. .cm-tab { display: inline-block; text-decoration: inherit; }
  91. .CodeMirror-rulers {
  92. position: absolute;
  93. left: 0; right: 0; top: -50px; bottom: -20px;
  94. overflow: hidden;
  95. }
  96. .CodeMirror-ruler {
  97. border-left: 1px solid #ccc;
  98. top: 0; bottom: 0;
  99. position: absolute;
  100. }
  101. /* DEFAULT THEME */
  102. .cm-s-default .cm-header {color: blue;}
  103. .cm-s-default .cm-quote {color: #090;}
  104. .cm-negative {color: #d44;}
  105. .cm-positive {color: #292;}
  106. .cm-header, .cm-strong {font-weight: bold;}
  107. .cm-em {font-style: italic;}
  108. .cm-link {text-decoration: underline;}
  109. .cm-strikethrough {text-decoration: line-through;}
  110. .cm-s-default .cm-keyword {color: #708;}
  111. .cm-s-default .cm-atom {color: #219;}
  112. .cm-s-default .cm-number {color: #164;}
  113. .cm-s-default .cm-def {color: #00f;}
  114. .cm-s-default .cm-variable,
  115. .cm-s-default .cm-punctuation,
  116. .cm-s-default .cm-property,
  117. .cm-s-default .cm-operator {}
  118. .cm-s-default .cm-variable-2 {color: #05a;}
  119. .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
  120. .cm-s-default .cm-comment {color: #a50;}
  121. .cm-s-default .cm-string {color: #a11;}
  122. .cm-s-default .cm-string-2 {color: #f50;}
  123. .cm-s-default .cm-meta {color: #555;}
  124. .cm-s-default .cm-qualifier {color: #555;}
  125. .cm-s-default .cm-builtin {color: #30a;}
  126. .cm-s-default .cm-bracket {color: #997;}
  127. .cm-s-default .cm-tag {color: #170;}
  128. .cm-s-default .cm-attribute {color: #00c;}
  129. .cm-s-default .cm-hr {color: #999;}
  130. .cm-s-default .cm-link {color: #00c;}
  131. .cm-s-default .cm-error {color: #f00;}
  132. .cm-invalidchar {color: #f00;}
  133. .CodeMirror-composing { border-bottom: 2px solid; }
  134. /* Default styles for common addons */
  135. div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
  136. div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
  137. .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
  138. .CodeMirror-activeline-background {background: #e8f2ff;}
  139. /* STOP */
  140. /* The rest of this file contains styles related to the mechanics of
  141. the editor. You probably shouldn't touch them. */
  142. .CodeMirror {
  143. position: relative;
  144. overflow: hidden;
  145. background: white;
  146. }
  147. .CodeMirror-scroll {
  148. overflow: scroll !important; /* Things will break if this is overridden */
  149. /* 30px is the magic margin used to hide the element's real scrollbars */
  150. /* See overflow: hidden in .CodeMirror */
  151. margin-bottom: -30px; margin-right: -30px;
  152. padding-bottom: 30px;
  153. height: 100%;
  154. outline: none; /* Prevent dragging from highlighting the element */
  155. position: relative;
  156. }
  157. .CodeMirror-sizer {
  158. position: relative;
  159. border-right: 30px solid transparent;
  160. }
  161. /* The fake, visible scrollbars. Used to force redraw during scrolling
  162. before actual scrolling happens, thus preventing shaking and
  163. flickering artifacts. */
  164. .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  165. position: absolute;
  166. z-index: 6;
  167. display: none;
  168. }
  169. .CodeMirror-vscrollbar {
  170. right: 0; top: 0;
  171. overflow-x: hidden;
  172. overflow-y: scroll;
  173. }
  174. .CodeMirror-hscrollbar {
  175. bottom: 0; left: 0;
  176. overflow-y: hidden;
  177. overflow-x: scroll;
  178. }
  179. .CodeMirror-scrollbar-filler {
  180. right: 0; bottom: 0;
  181. }
  182. .CodeMirror-gutter-filler {
  183. left: 0; bottom: 0;
  184. }
  185. .CodeMirror-gutters {
  186. position: absolute; left: 0; top: 0;
  187. min-height: 100%;
  188. z-index: 3;
  189. }
  190. .CodeMirror-gutter {
  191. white-space: normal;
  192. height: 100%;
  193. display: inline-block;
  194. vertical-align: top;
  195. margin-bottom: -30px;
  196. }
  197. .CodeMirror-gutter-wrapper {
  198. position: absolute;
  199. z-index: 4;
  200. background: none !important;
  201. border: none !important;
  202. }
  203. .CodeMirror-gutter-background {
  204. position: absolute;
  205. top: 0; bottom: 0;
  206. z-index: 4;
  207. }
  208. .CodeMirror-gutter-elt {
  209. position: absolute;
  210. cursor: default;
  211. z-index: 4;
  212. }
  213. .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
  214. .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
  215. .CodeMirror-lines {
  216. cursor: text;
  217. min-height: 1px; /* prevents collapsing before first draw */
  218. }
  219. .CodeMirror pre {
  220. /* Reset some styles that the rest of the page might have set */
  221. -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  222. border-width: 0;
  223. background: transparent;
  224. font-family: inherit;
  225. font-size: inherit;
  226. margin: 0;
  227. white-space: pre;
  228. word-wrap: normal;
  229. line-height: inherit;
  230. color: inherit;
  231. z-index: 2;
  232. position: relative;
  233. overflow: visible;
  234. -webkit-tap-highlight-color: transparent;
  235. -webkit-font-variant-ligatures: contextual;
  236. font-variant-ligatures: contextual;
  237. }
  238. .CodeMirror-wrap pre {
  239. word-wrap: break-word;
  240. white-space: pre-wrap;
  241. word-break: normal;
  242. }
  243. .CodeMirror-linebackground {
  244. position: absolute;
  245. left: 0; right: 0; top: 0; bottom: 0;
  246. z-index: 0;
  247. }
  248. .CodeMirror-linewidget {
  249. position: relative;
  250. z-index: 2;
  251. overflow: auto;
  252. }
  253. .CodeMirror-widget {}
  254. .CodeMirror-rtl pre { direction: rtl; }
  255. .CodeMirror-code {
  256. outline: none;
  257. }
  258. /* Force content-box sizing for the elements where we expect it */
  259. .CodeMirror-scroll,
  260. .CodeMirror-sizer,
  261. .CodeMirror-gutter,
  262. .CodeMirror-gutters,
  263. .CodeMirror-linenumber {
  264. -moz-box-sizing: content-box;
  265. box-sizing: content-box;
  266. }
  267. .CodeMirror-measure {
  268. position: absolute;
  269. width: 100%;
  270. height: 0;
  271. overflow: hidden;
  272. visibility: hidden;
  273. }
  274. .CodeMirror-cursor {
  275. position: absolute;
  276. pointer-events: none;
  277. }
  278. .CodeMirror-measure pre { position: static; }
  279. div.CodeMirror-cursors {
  280. visibility: hidden;
  281. position: relative;
  282. z-index: 3;
  283. }
  284. div.CodeMirror-dragcursors {
  285. visibility: visible;
  286. }
  287. .CodeMirror-focused div.CodeMirror-cursors {
  288. visibility: visible;
  289. }
  290. .CodeMirror-selected { background: #d9d9d9; }
  291. .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
  292. .CodeMirror-crosshair { cursor: crosshair; }
  293. .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
  294. .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
  295. .cm-searching {
  296. background-color: #ffa;
  297. background-color: rgba(255, 255, 0, .4);
  298. }
  299. /* Used to force a border model for a node */
  300. .cm-force-border { padding-right: .1px; }
  301. @media print {
  302. /* Hide the cursor when printing */
  303. .CodeMirror div.CodeMirror-cursors {
  304. visibility: hidden;
  305. }
  306. }
  307. /* See issue #2901 */
  308. .cm-tab-wrap-hack:after { content: ''; }
  309. /* Help users use markselection to safely style text background */
  310. span.CodeMirror-selectedtext { background: none; }
  311. .CodeMirror {
  312. height: auto;
  313. min-height: 300px;
  314. border: 1px solid #ddd;
  315. border-bottom-left-radius: 4px;
  316. border-bottom-right-radius: 4px;
  317. padding: 10px;
  318. font: inherit;
  319. z-index: 1;
  320. }
  321. .CodeMirror-scroll {
  322. min-height: 300px
  323. }
  324. .CodeMirror-fullscreen {
  325. background: #fff;
  326. position: fixed !important;
  327. top: 50px;
  328. left: 0;
  329. right: 0;
  330. bottom: 0;
  331. height: auto;
  332. z-index: 9;
  333. }
  334. .CodeMirror-sided {
  335. width: 50% !important;
  336. }
  337. .editor-toolbar {
  338. position: relative;
  339. opacity: .6;
  340. -webkit-user-select: none;
  341. -moz-user-select: none;
  342. -ms-user-select: none;
  343. -o-user-select: none;
  344. user-select: none;
  345. padding: 0 10px;
  346. border-top: 1px solid #bbb;
  347. border-left: 1px solid #bbb;
  348. border-right: 1px solid #bbb;
  349. border-top-left-radius: 4px;
  350. border-top-right-radius: 4px;
  351. }
  352. .editor-toolbar:after,
  353. .editor-toolbar:before {
  354. display: block;
  355. content: ' ';
  356. height: 1px;
  357. }
  358. .editor-toolbar:before {
  359. margin-bottom: 8px
  360. }
  361. .editor-toolbar:after {
  362. margin-top: 8px
  363. }
  364. .editor-toolbar:hover,
  365. .editor-wrapper input.title:focus,
  366. .editor-wrapper input.title:hover {
  367. opacity: .8
  368. }
  369. .editor-toolbar.fullscreen {
  370. width: 100%;
  371. height: 50px;
  372. overflow-x: auto;
  373. overflow-y: hidden;
  374. white-space: nowrap;
  375. padding-top: 10px;
  376. padding-bottom: 10px;
  377. box-sizing: border-box;
  378. background: #fff;
  379. border: 0;
  380. position: fixed;
  381. top: 0;
  382. left: 0;
  383. opacity: 1;
  384. z-index: 9;
  385. }
  386. .editor-toolbar.fullscreen::before {
  387. width: 20px;
  388. height: 50px;
  389. background: -moz-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  390. background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(255, 255, 255, 0)));
  391. background: -webkit-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  392. background: -o-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  393. background: -ms-linear-gradient(left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  394. background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  395. position: fixed;
  396. top: 0;
  397. left: 0;
  398. margin: 0;
  399. padding: 0;
  400. }
  401. .editor-toolbar.fullscreen::after {
  402. width: 20px;
  403. height: 50px;
  404. background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  405. background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 1)));
  406. background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  407. background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  408. background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  409. background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  410. position: fixed;
  411. top: 0;
  412. right: 0;
  413. margin: 0;
  414. padding: 0;
  415. }
  416. .editor-toolbar a {
  417. display: inline-block;
  418. text-align: center;
  419. text-decoration: none !important;
  420. color: #2c3e50 !important;
  421. width: 30px;
  422. height: 30px;
  423. margin: 0;
  424. border: 1px solid transparent;
  425. border-radius: 3px;
  426. cursor: pointer;
  427. }
  428. .editor-toolbar a.active,
  429. .editor-toolbar a:hover {
  430. background: #fcfcfc;
  431. border-color: #95a5a6;
  432. }
  433. .editor-toolbar a:before {
  434. line-height: 30px
  435. }
  436. .editor-toolbar i.separator {
  437. display: inline-block;
  438. width: 0;
  439. border-left: 1px solid #d9d9d9;
  440. border-right: 1px solid #fff;
  441. color: transparent;
  442. text-indent: -10px;
  443. margin: 0 6px;
  444. }
  445. .editor-toolbar a.fa-header-x:after {
  446. font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  447. font-size: 65%;
  448. vertical-align: text-bottom;
  449. position: relative;
  450. top: 2px;
  451. }
  452. .editor-toolbar a.fa-header-1:after {
  453. content: "1";
  454. }
  455. .editor-toolbar a.fa-header-2:after {
  456. content: "2";
  457. }
  458. .editor-toolbar a.fa-header-3:after {
  459. content: "3";
  460. }
  461. .editor-toolbar a.fa-header-bigger:after {
  462. content: "▲";
  463. }
  464. .editor-toolbar a.fa-header-smaller:after {
  465. content: "▼";
  466. }
  467. .editor-toolbar.disabled-for-preview a:not(.no-disable) {
  468. pointer-events: none;
  469. background: #fff;
  470. border-color: transparent;
  471. text-shadow: inherit;
  472. }
  473. @media only screen and (max-width: 700px) {
  474. .editor-toolbar a.no-mobile {
  475. display: none;
  476. }
  477. }
  478. .editor-statusbar {
  479. padding: 8px 10px;
  480. font-size: 12px;
  481. color: #959694;
  482. text-align: right;
  483. }
  484. .editor-statusbar span {
  485. display: inline-block;
  486. min-width: 4em;
  487. margin-left: 1em;
  488. }
  489. .editor-statusbar .lines:before {
  490. content: 'lines: '
  491. }
  492. .editor-statusbar .words:before {
  493. content: 'words: '
  494. }
  495. .editor-statusbar .characters:before {
  496. content: 'characters: '
  497. }
  498. .editor-preview {
  499. padding: 10px;
  500. position: absolute;
  501. width: 100%;
  502. height: 100%;
  503. top: 0;
  504. left: 0;
  505. background: #fafafa;
  506. z-index: 7;
  507. overflow: auto;
  508. display: none;
  509. box-sizing: border-box;
  510. }
  511. .editor-preview-side {
  512. padding: 10px;
  513. position: fixed;
  514. bottom: 0;
  515. width: 50%;
  516. top: 50px;
  517. right: 0;
  518. background: #fafafa;
  519. z-index: 9;
  520. overflow: auto;
  521. display: none;
  522. box-sizing: border-box;
  523. border: 1px solid #ddd;
  524. }
  525. .editor-preview-active-side {
  526. display: block
  527. }
  528. .editor-preview-active {
  529. display: block
  530. }
  531. .editor-preview>p,
  532. .editor-preview-side>p {
  533. margin-top: 0
  534. }
  535. .editor-preview pre,
  536. .editor-preview-side pre {
  537. background: #eee;
  538. margin-bottom: 10px;
  539. }
  540. .editor-preview table td,
  541. .editor-preview table th,
  542. .editor-preview-side table td,
  543. .editor-preview-side table th {
  544. border: 1px solid #ddd;
  545. padding: 5px;
  546. }
  547. .CodeMirror .CodeMirror-code .cm-tag {
  548. color: #63a35c;
  549. }
  550. .CodeMirror .CodeMirror-code .cm-attribute {
  551. color: #795da3;
  552. }
  553. .CodeMirror .CodeMirror-code .cm-string {
  554. color: #183691;
  555. }
  556. .CodeMirror .CodeMirror-selected {
  557. background: #d9d9d9;
  558. }
  559. .CodeMirror .CodeMirror-code .cm-header-1 {
  560. font-size: 200%;
  561. line-height: 200%;
  562. }
  563. .CodeMirror .CodeMirror-code .cm-header-2 {
  564. font-size: 160%;
  565. line-height: 160%;
  566. }
  567. .CodeMirror .CodeMirror-code .cm-header-3 {
  568. font-size: 125%;
  569. line-height: 125%;
  570. }
  571. .CodeMirror .CodeMirror-code .cm-header-4 {
  572. font-size: 110%;
  573. line-height: 110%;
  574. }
  575. .CodeMirror .CodeMirror-code .cm-comment {
  576. background: rgba(0, 0, 0, .05);
  577. border-radius: 2px;
  578. }
  579. .CodeMirror .CodeMirror-code .cm-link {
  580. color: #7f8c8d;
  581. }
  582. .CodeMirror .CodeMirror-code .cm-url {
  583. color: #aab2b3;
  584. }
  585. .CodeMirror .CodeMirror-code .cm-strikethrough {
  586. text-decoration: line-through;
  587. }
  588. .CodeMirror .CodeMirror-placeholder {
  589. opacity: .5;
  590. }
  591. .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word) {
  592. background: rgba(255, 0, 0, .15);
  593. }