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