prosemirror.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. .ProseMirror, .ProseMirror-static {
  2. outline: 0;
  3. border: 0;
  4. font-size: 16px;
  5. white-space: break-spaces;
  6. &:not(.ProseMirror-static) {
  7. user-select: text;
  8. }
  9. ::selection {
  10. background-color: rgba($themeColor, 0.25);
  11. color: inherit;
  12. }
  13. p {
  14. margin: 0;
  15. }
  16. .empty {
  17. margin: 0;
  18. font-size: 0;
  19. padding: 0;
  20. }
  21. p:first-child {
  22. margin-top: 0;
  23. // font-size: 0;
  24. }
  25. ul, ol, li {
  26. margin: 0;
  27. }
  28. ul {
  29. list-style-type: none;
  30. padding-left: 1.5em; /* 为伪元素留出空间 */
  31. li::before {
  32. content: "•";
  33. list-style-type: none;
  34. padding: 0.125em 0;
  35. float: left;
  36. margin-right: 0.4em;
  37. }
  38. li.empty-li::before {
  39. font-size: 0;
  40. content: none !important;
  41. }
  42. }
  43. ol {
  44. list-style-type: decimal;
  45. padding-inline-start: 1.25em;
  46. li {
  47. list-style-type: inherit;
  48. padding: 0.125em 0;
  49. float: left;
  50. margin-right: 0.4em;
  51. }
  52. li.empty-li::before {
  53. content: none !important;
  54. }
  55. }
  56. code {
  57. background-color: #f1f1f1;
  58. padding: 2px 6px;
  59. margin: 0 1px;
  60. border-radius: 4px;
  61. font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  62. }
  63. sup {
  64. vertical-align: super;
  65. font-size: smaller;
  66. }
  67. sub {
  68. vertical-align: baseline;
  69. }
  70. blockquote {
  71. overflow: hidden;
  72. padding: 0 1.2em;
  73. margin: 0.6em 0;
  74. font-style: italic;
  75. border-left: 4px solid #e0e0e0;
  76. }
  77. [data-indent='1'] {
  78. padding-left: 1em;
  79. }
  80. [data-indent='2'] {
  81. padding-left: 2em;
  82. }
  83. [data-indent='3'] {
  84. padding-left: 3em;
  85. }
  86. [data-indent='4'] {
  87. padding-left: 4em;
  88. }
  89. [data-indent='5'] {
  90. padding-left: 5em;
  91. }
  92. [data-indent='6'] {
  93. padding-left: 6em;
  94. }
  95. [data-indent='7'] {
  96. padding-left: 7em;
  97. }
  98. [data-indent='8'] {
  99. padding-left: 8em;
  100. }
  101. }
  102. .ProseMirror-selectednode {
  103. outline: none !important;
  104. }