UNPKG

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