base.styl 7.2 KB

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