core.styl 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. // Styles necessary for Quill
  2. LIST_STYLE = decimal lower-alpha lower-roman
  3. LIST_STYLE_WIDTH = 1.2em
  4. LIST_STYLE_MARGIN = 0.3em
  5. LIST_STYLE_OUTER_WIDTH = LIST_STYLE_MARGIN + LIST_STYLE_WIDTH
  6. MAX_INDENT = 9
  7. resets(arr)
  8. unquote('list-' + join(' list-', arr))
  9. .ql-container
  10. box-sizing: border-box
  11. font-family: Helvetica, Arial, sans-serif
  12. font-size: 13px
  13. height: 100%
  14. margin: 0px
  15. position: relative
  16. .ql-container.ql-disabled
  17. .ql-tooltip
  18. visibility: hidden
  19. .ql-editor
  20. ul[data-checked] > li::before
  21. pointer-events: none
  22. .ql-clipboard
  23. left: -100000px
  24. height: 1px
  25. overflow-y: hidden
  26. position: absolute
  27. top: 50%
  28. p
  29. margin: 0
  30. padding: 0
  31. .ql-editor
  32. box-sizing: border-box
  33. line-height: 1.42
  34. height: 100%
  35. outline: none
  36. overflow-y: auto
  37. padding: 12px 15px
  38. tab-size: 4
  39. -moz-tab-size: 4
  40. text-align: left
  41. white-space: pre-wrap
  42. word-wrap: break-word
  43. > *
  44. cursor: text
  45. p, ol, ul, pre, blockquote, h1, h2, h3, h4, h5, h6
  46. margin: 0
  47. padding: 0
  48. counter-reset: resets(1..MAX_INDENT)
  49. ol, ul
  50. padding-left: 1.5em
  51. ol > li, ul > li
  52. list-style-type: none
  53. ul > li::before
  54. content: '\2022'
  55. ul[data-checked=true],
  56. ul[data-checked=false]
  57. pointer-events: none
  58. > li *
  59. pointer-events: all
  60. > li::before
  61. color: #777
  62. cursor: pointer
  63. pointer-events: all
  64. ul[data-checked=true] > li::before
  65. content: '\2611'
  66. ul[data-checked=false] > li::before
  67. content: '\2610'
  68. li::before
  69. display: inline-block
  70. white-space: nowrap
  71. width: LIST_STYLE_WIDTH
  72. li:not(.ql-direction-rtl)::before
  73. margin-left: -1*LIST_STYLE_OUTER_WIDTH
  74. margin-right: LIST_STYLE_MARGIN
  75. text-align: right
  76. li.ql-direction-rtl::before
  77. margin-left: LIST_STYLE_MARGIN
  78. margin-right: -1*LIST_STYLE_OUTER_WIDTH
  79. ol, ul
  80. li:not(.ql-direction-rtl)
  81. padding-left: LIST_STYLE_OUTER_WIDTH
  82. li.ql-direction-rtl
  83. padding-right: LIST_STYLE_OUTER_WIDTH
  84. ol
  85. li
  86. counter-reset: resets(1..MAX_INDENT)
  87. counter-increment: unquote('list-0')
  88. &:before
  89. content: unquote('counter(list-0, ' + LIST_STYLE[0] + ')') '. '
  90. for num in (1..MAX_INDENT)
  91. li.ql-indent-{num}
  92. counter-increment: unquote('list-' + num)
  93. &:before
  94. content: unquote('counter(list-' + num + ', ' + LIST_STYLE[num%3] + ')') '. '
  95. if (num < MAX_INDENT)
  96. li.ql-indent-{num}
  97. counter-reset: resets((num+1)..MAX_INDENT)
  98. for num in (1..MAX_INDENT)
  99. .ql-indent-{num}:not(.ql-direction-rtl)
  100. padding-left: (3*num)em
  101. li.ql-indent-{num}:not(.ql-direction-rtl)
  102. padding-left: (3*num + LIST_STYLE_OUTER_WIDTH)em
  103. .ql-indent-{num}.ql-direction-rtl.ql-align-right
  104. padding-right: (3*num)em
  105. li.ql-indent-{num}.ql-direction-rtl.ql-align-right
  106. padding-right: (3*num + LIST_STYLE_OUTER_WIDTH)em
  107. .ql-video
  108. display: block
  109. max-width: 100%
  110. .ql-video.ql-align-center
  111. margin: 0 auto
  112. .ql-video.ql-align-right
  113. margin: 0 0 0 auto
  114. .ql-bg-black
  115. background-color: rgb(0,0,0)
  116. .ql-bg-red
  117. background-color: rgb(230,0,0)
  118. .ql-bg-orange
  119. background-color: rgb(255,153,0)
  120. .ql-bg-yellow
  121. background-color: rgb(255,255,0)
  122. .ql-bg-green
  123. background-color: rgb(0,138,0)
  124. .ql-bg-blue
  125. background-color: rgb(0,102,204)
  126. .ql-bg-purple
  127. background-color: rgb(153,51,255)
  128. .ql-color-white
  129. color: rgb(255,255,255)
  130. .ql-color-red
  131. color: rgb(230,0,0)
  132. .ql-color-orange
  133. color: rgb(255,153,0)
  134. .ql-color-yellow
  135. color: rgb(255,255,0)
  136. .ql-color-green
  137. color: rgb(0,138,0)
  138. .ql-color-blue
  139. color: rgb(0,102,204)
  140. .ql-color-purple
  141. color: rgb(153,51,255)
  142. .ql-font-serif
  143. font-family: Georgia, Times New Roman, serif
  144. .ql-font-monospace
  145. font-family: Monaco, Courier New, monospace
  146. .ql-size-small
  147. font-size: 0.75em
  148. .ql-size-large
  149. font-size: 1.5em
  150. .ql-size-huge
  151. font-size: 2.5em
  152. .ql-direction-rtl
  153. direction: rtl
  154. text-align: inherit
  155. .ql-align-center
  156. text-align: center
  157. .ql-align-justify
  158. text-align: justify
  159. .ql-align-right
  160. text-align: right
  161. .ql-editor.ql-blank::before
  162. color: rgba(0,0,0,0.6)
  163. content: attr(data-placeholder)
  164. font-style: italic
  165. left: 15px
  166. pointer-events: none
  167. position: absolute
  168. right: 15px