UNPKG

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