editormd.codemirror.scss 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @charset "UTF-8";
  2. .editormd .CodeMirror, #{$prefix}preview {
  3. display: inline-block;
  4. width: 50%;
  5. height: 100%;
  6. vertical-align: top;
  7. @include box-sizing(border-box);
  8. margin: 0;
  9. }
  10. #{$prefix}preview {
  11. position: absolute;
  12. top: 35px;
  13. right: 0;
  14. right: -1px\0;
  15. overflow: auto;
  16. line-height: 1.6;
  17. display: none;
  18. background: #fff;
  19. }
  20. .editormd {
  21. .CodeMirror {
  22. z-index: 10;
  23. float: left;
  24. border-right: 1px solid $borderColor;
  25. font-size: 14px;
  26. font-family: "YaHei Consolas Hybrid", Consolas, "微软雅黑", "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, "Monaco", courier, monospace;
  27. line-height: 1.6;
  28. margin-top: 35px;
  29. pre {
  30. font-size: 14px;
  31. padding: 0 12px;
  32. }
  33. }
  34. .CodeMirror-linenumbers {
  35. padding: 0 5px;
  36. }
  37. .CodeMirror-selected {
  38. background: #70B7FF;
  39. }
  40. .CodeMirror-focused .CodeMirror-selected {
  41. background: #70B7FF;
  42. }
  43. .CodeMirror, .CodeMirror-scroll, #{$prefix}preview {
  44. -webkit-overflow-scrolling : touch;
  45. }
  46. .styled-background {
  47. background-color: #ff7;
  48. }
  49. .CodeMirror-focused .cm-matchhighlight {
  50. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
  51. background-position: bottom;
  52. background-repeat: repeat-x;
  53. }
  54. .CodeMirror-empty {
  55. //outline: 1px solid #c22;
  56. &.CodeMirror-focused {
  57. outline: none;
  58. }
  59. }
  60. .CodeMirror pre.CodeMirror-placeholder {
  61. color: #999;
  62. }
  63. .cm-trailingspace {
  64. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);
  65. background-position: bottom left;
  66. background-repeat: repeat-x;
  67. }
  68. .cm-tab {
  69. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
  70. background-position: right;
  71. background-repeat: no-repeat;
  72. }
  73. }