_editor.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. .blog-editor-container {
  2. font-size: 20px;
  3. color: #414141;
  4. line-height: 1.5;
  5. * {
  6. &:focus {
  7. outline: none;
  8. }
  9. }
  10. .button {
  11. font-weight: bold;
  12. display: inline-flex;
  13. background: transparent;
  14. border: 0;
  15. color: $color-black;
  16. padding: 0.2rem 0.5rem;
  17. margin-right: 0.2rem;
  18. border-radius: 3px;
  19. cursor: pointer;
  20. background-color: rgba($color-black, 0.1);
  21. &:hover {
  22. background-color: rgba($color-black, 0.15);
  23. }
  24. }
  25. .message {
  26. background-color: rgba($color-black, 0.05);
  27. color: rgba($color-black, 0.7);
  28. padding: 1rem;
  29. border-radius: 6px;
  30. margin-bottom: 1.5rem;
  31. font-style: italic;
  32. }
  33. }
  34. .editor {
  35. position: relative;
  36. &.editor-squished {
  37. max-width: 800px;
  38. margin: 0 auto 5rem auto;
  39. }
  40. *.is-empty:nth-child(1)::before,
  41. *.is-empty:nth-child(2)::before,
  42. *.is-empty:nth-child(3)::before {
  43. content: attr(data-empty-text);
  44. float: left;
  45. color: #aaa;
  46. pointer-events: none;
  47. height: 0;
  48. font-style: italic;
  49. }
  50. &__content {
  51. word-wrap: break-word;
  52. * {
  53. caret-color: currentColor;
  54. }
  55. h1 {
  56. font-size: 50px;
  57. font-weight: bold;
  58. }
  59. h2 {
  60. font-size: 1.5em;
  61. // font-weight: bold;
  62. color: rgba(0,0,0,.54);
  63. }
  64. h3 {
  65. font-size: 1.17em;
  66. font-weight: bold;
  67. }
  68. hr {
  69. background-color: black;
  70. }
  71. pre {
  72. padding: 0.7rem 1rem;
  73. border-radius: 5px;
  74. background: $color-black;
  75. color: $color-white;
  76. font-size: 1.1rem;
  77. overflow-x: auto;
  78. code {
  79. display: block;
  80. }
  81. }
  82. p code {
  83. display: inline-block;
  84. padding: 0 0.4rem;
  85. border-radius: 5px;
  86. font-size: 1.1rem;
  87. font-weight: bold;
  88. background: rgba($color-black, 0.1);
  89. color: rgba($color-black, 0.8);
  90. }
  91. p {
  92. min-height: 30px;
  93. font-size: 21px;
  94. line-height: 1.58;
  95. letter-spacing: -.003em;
  96. }
  97. ul {
  98. list-style: disc;
  99. }
  100. ul,
  101. ol {
  102. padding-left: 1rem;
  103. }
  104. li > p,
  105. li > ol,
  106. li > ul {
  107. margin: 0;
  108. }
  109. a {
  110. color: inherit;
  111. }
  112. blockquote {
  113. border-left: 3px solid rgba($color-black, 0.1);
  114. color: rgba($color-black, 0.8);
  115. padding-left: 0.8rem;
  116. font-style: italic;
  117. p {
  118. margin: 0;
  119. }
  120. }
  121. img {
  122. max-width: 100%;
  123. border-radius: 3px;
  124. }
  125. table {
  126. border-collapse: collapse;
  127. table-layout: fixed;
  128. width: 100%;
  129. margin: 0;
  130. overflow: hidden;
  131. td, th {
  132. min-width: 1em;
  133. border: 2px solid $color-grey;
  134. padding: 3px 5px;
  135. vertical-align: top;
  136. box-sizing: border-box;
  137. position: relative;
  138. > * {
  139. margin-bottom: 0;
  140. }
  141. }
  142. th {
  143. font-weight: bold;
  144. text-align: left;
  145. }
  146. .selectedCell:after {
  147. z-index: 2;
  148. position: absolute;
  149. content: "";
  150. left: 0; right: 0; top: 0; bottom: 0;
  151. background: rgba(200, 200, 255, 0.4);
  152. pointer-events: none;
  153. }
  154. .column-resize-handle {
  155. position: absolute;
  156. right: -2px; top: 0; bottom: 0;
  157. width: 4px;
  158. z-index: 20;
  159. background-color: #adf;
  160. pointer-events: none;
  161. }
  162. }
  163. .tableWrapper {
  164. margin: 1em 0;
  165. overflow-x: auto;
  166. }
  167. .resize-cursor {
  168. cursor: ew-resize;
  169. cursor: col-resize;
  170. }
  171. }
  172. pre {
  173. &::before {
  174. content: attr(data-language);
  175. text-transform: uppercase;
  176. display: block;
  177. text-align: right;
  178. font-weight: bold;
  179. font-size: 0.6rem;
  180. }
  181. code {
  182. .hljs-comment,
  183. .hljs-quote {
  184. color: #999999;
  185. }
  186. .hljs-variable,
  187. .hljs-template-variable,
  188. .hljs-attribute,
  189. .hljs-tag,
  190. .hljs-name,
  191. .hljs-regexp,
  192. .hljs-link,
  193. .hljs-name,
  194. .hljs-selector-id,
  195. .hljs-selector-class {
  196. color: #f2777a;
  197. }
  198. .hljs-number,
  199. .hljs-meta,
  200. .hljs-built_in,
  201. .hljs-builtin-name,
  202. .hljs-literal,
  203. .hljs-type,
  204. .hljs-params {
  205. color: #f99157;
  206. }
  207. .hljs-string,
  208. .hljs-symbol,
  209. .hljs-bullet {
  210. color: #99cc99;
  211. }
  212. .hljs-title,
  213. .hljs-section {
  214. color: #ffcc66;
  215. }
  216. .hljs-keyword,
  217. .hljs-selector-tag {
  218. color: #6699cc;
  219. }
  220. .hljs-emphasis {
  221. font-style: italic;
  222. }
  223. .hljs-strong {
  224. font-weight: 700;
  225. }
  226. }
  227. }
  228. }