core.styl 4.7 KB

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