base.styl 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. // Styles shared between snow and bubble
  2. controlHeight = 24px
  3. inputPaddingWidth = 5px
  4. inputPaddingHeight = 3px
  5. colorItemMargin = 2px
  6. colorItemSize = 16px
  7. colorItemsPerRow = 7
  8. .ql-{themeName}.ql-toolbar, .ql-{themeName} .ql-toolbar
  9. &:after
  10. clear: both
  11. content: ''
  12. display: table
  13. button
  14. background: none
  15. border: none
  16. cursor: pointer
  17. display: inline-block
  18. float: left
  19. height: controlHeight
  20. outline: none
  21. padding: inputPaddingHeight inputPaddingWidth
  22. width: controlHeight + (inputPaddingWidth - inputPaddingHeight)*2
  23. svg
  24. float: left
  25. height: 100%
  26. input.ql-image[type=file]
  27. display: none
  28. button:hover, button.ql-active,
  29. .ql-picker-label:hover, .ql-picker-label.ql-active,
  30. .ql-picker-item:hover, .ql-picker-item.ql-selected
  31. color: activeColor
  32. .ql-fill, .ql-stroke.ql-fill
  33. fill: activeColor
  34. .ql-stroke, .ql-stroke-mitter
  35. stroke: activeColor
  36. .ql-{themeName}
  37. box-sizing: border-box
  38. *
  39. box-sizing: border-box
  40. .ql-hidden
  41. display: none
  42. .ql-out-bottom, .ql-out-top
  43. visibility: hidden
  44. .ql-tooltip
  45. position: absolute
  46. a
  47. cursor: pointer
  48. text-decoration: none
  49. .ql-formats
  50. &:after
  51. clear: both
  52. content: ''
  53. display: table
  54. display: inline-block
  55. vertical-align: middle
  56. .ql-toolbar.{themeName}
  57. .ql-stroke
  58. fill: none
  59. stroke: inactiveColor
  60. stroke-linecap: round
  61. stroke-linejoin: round
  62. stroke-width: 2
  63. .ql-stroke-mitter
  64. fill: none
  65. stroke: inactiveColor
  66. stroke-mitterlimit: 10
  67. stroke-width: 2
  68. .ql-fill, .ql-stroke.ql-fill
  69. fill: inactiveColor
  70. .ql-empty
  71. fill: none
  72. .ql-even
  73. fill-rule: evenodd
  74. .ql-thin, .ql-stroke.ql-thin
  75. stroke-width: 1
  76. .ql-transparent
  77. opacity: 0.4
  78. .ql-direction
  79. svg:last-child
  80. display: none
  81. .ql-direction.ql-active
  82. svg:last-child
  83. display: inline
  84. svg:first-child
  85. display: none
  86. .ql-editor
  87. h1
  88. font-size: 2em
  89. h2
  90. font-size: 1.5em
  91. h3
  92. font-size: 1.17em
  93. h4
  94. font-size: 1em
  95. h5
  96. font-size: 0.83em
  97. h6
  98. font-size: 0.67em
  99. a
  100. text-decoration: underline
  101. blockquote
  102. border-left: 4px solid #ccc
  103. margin-bottom: 5px
  104. margin-top: 5px
  105. padding-left: 16px
  106. code, pre
  107. background-color: #f0f0f0
  108. border-radius: 3px
  109. pre
  110. white-space: pre-wrap
  111. margin-bottom: 5px
  112. margin-top: 5px
  113. padding: 5px 10px
  114. code
  115. font-size: 85%
  116. padding-bottom: 2px
  117. padding-top: 2px
  118. &:before, &:after
  119. content: "\00a0"
  120. letter-spacing: -2px
  121. pre.ql-syntax
  122. background-color: #23241f
  123. color: #f8f8f2;
  124. overflow: visible
  125. img
  126. max-width: 100%
  127. .ql-picker
  128. color: inactiveColor
  129. display: inline-block
  130. float: left
  131. font-size: 14px
  132. font-weight: 500
  133. height: controlHeight
  134. position: relative
  135. vertical-align: middle
  136. .ql-picker-label
  137. cursor: pointer
  138. display: inline-block
  139. height: 100%
  140. padding-left: 8px
  141. padding-right: 2px
  142. position: relative
  143. width: 100%
  144. &::before
  145. display: inline-block
  146. line-height: 22px
  147. .ql-picker-options
  148. background-color: backgroundColor
  149. display: none
  150. min-width: 100%
  151. padding: 4px 8px
  152. position: absolute
  153. white-space: nowrap
  154. .ql-picker-item
  155. cursor: pointer
  156. display: block
  157. padding-bottom: 5px
  158. padding-top: 5px
  159. .ql-picker.ql-expanded
  160. .ql-picker-label
  161. color: borderColor
  162. z-index: 2
  163. .ql-fill
  164. fill: borderColor
  165. .ql-stroke
  166. stroke: borderColor
  167. .ql-picker-options
  168. display: block
  169. margin-top: -1px
  170. top: 100%
  171. z-index: 1
  172. .ql-color-picker, .ql-icon-picker
  173. width: controlHeight + 4
  174. .ql-picker-label
  175. padding: 2px 4px
  176. svg
  177. right: 4px
  178. .ql-icon-picker
  179. .ql-picker-options
  180. padding: 4px 0px
  181. .ql-picker-item
  182. height: controlHeight
  183. width: controlHeight
  184. padding: 2px 4px
  185. .ql-color-picker
  186. .ql-picker-options
  187. padding: inputPaddingHeight inputPaddingWidth
  188. width: (colorItemSize + 2*colorItemMargin) * colorItemsPerRow + 2*inputPaddingWidth + 2 // +2 for the border
  189. .ql-picker-item
  190. border: 1px solid transparent
  191. float: left
  192. height: colorItemSize
  193. margin: colorItemMargin
  194. padding: 0px
  195. width: colorItemSize
  196. .ql-picker-item.ql-primary-color
  197. margin-bottom: toolbarPadding
  198. .ql-picker:not(.ql-color-picker):not(.ql-icon-picker)
  199. svg
  200. position: absolute
  201. margin-top: -9px
  202. right: 0
  203. top: 50%
  204. width: 18px
  205. .ql-picker.ql-header, .ql-picker.ql-font, .ql-picker.ql-size
  206. .ql-picker-label[data-label]:not([data-label='']),
  207. .ql-picker-item[data-label]:not([data-label=''])
  208. &::before
  209. content: attr(data-label)
  210. .ql-picker.ql-header
  211. width: 98px
  212. .ql-picker-label::before,
  213. .ql-picker-item::before
  214. content: 'Normal'
  215. for num in (1..6)
  216. .ql-picker-label[data-value=\"{num}\"]::before,
  217. .ql-picker-item[data-value=\"{num}\"]::before
  218. content: 'Heading ' + num
  219. .ql-picker-item[data-value="1"]::before
  220. font-size: 2em
  221. .ql-picker-item[data-value="2"]::before
  222. font-size: 1.5em
  223. .ql-picker-item[data-value="3"]::before
  224. font-size: 1.17em
  225. .ql-picker-item[data-value="4"]::before
  226. font-size: 1em
  227. .ql-picker-item[data-value="5"]::before
  228. font-size: 0.83em
  229. .ql-picker-item[data-value="6"]::before
  230. font-size: 0.67em
  231. .ql-picker.ql-font
  232. width: 108px
  233. .ql-picker-label::before,
  234. .ql-picker-item::before
  235. content: 'Sans Serif'
  236. .ql-picker-label[data-value=serif]::before,
  237. .ql-picker-item[data-value=serif]::before
  238. content: 'Serif'
  239. .ql-picker-label[data-value=monospace]::before,
  240. .ql-picker-item[data-value=monospace]::before
  241. content: 'Monospace'
  242. .ql-picker-item[data-value=serif]::before
  243. font-family: Georgia, Times New Roman, serif;
  244. .ql-picker-item[data-value=monospace]::before
  245. font-family: Monaco, Courier New, monospace;
  246. .ql-picker.ql-size
  247. width: 98px
  248. .ql-picker-label::before,
  249. .ql-picker-item::before
  250. content: 'Normal'
  251. .ql-picker-label[data-value=small]::before,
  252. .ql-picker-item[data-value=small]::before
  253. content: 'Small'
  254. .ql-picker-label[data-value=large]::before,
  255. .ql-picker-item[data-value=large]::before
  256. content: 'Large'
  257. .ql-picker-label[data-value=huge]::before,
  258. .ql-picker-item[data-value=huge]::before
  259. content: 'Huge'
  260. .ql-picker-item[data-value=small]::before
  261. font-size: 10px
  262. .ql-picker-item[data-value=large]::before
  263. font-size: 18px
  264. .ql-picker-item[data-value=huge]::before
  265. font-size: 32px
  266. .ql-color-picker.ql-background
  267. .ql-picker-item
  268. background-color: #fff;
  269. .ql-color-picker.ql-color
  270. .ql-picker-item
  271. background-color: #000;