1"""
2    CSS syntax names.
3
4    Copyright (c)
5    See LICENSE for details.
6    <jtm@robot.is>
7"""
8css2 = [
9    'azimuth',
10    'background-attachment',
11    'background-color',
12    'background-image',
13    'background-position',
14    'background-repeat',
15    'background',
16    'border-collapse',
17    'border-color',
18    'border-spacing',
19    'border-style',
20    'border-top',
21    'border-right',
22    'border-bottom',
23    'border-left',
24    'border-top-color',
25    'border-right-color',
26    'border-bottom-color',
27    'border-left-color',
28    'border-top-style',
29    'border-right-style',
30    'border-bottom-style',
31    'border-left-style',
32    'border-top-width',
33    'border-right-width',
34    'border-bottom-width',
35    'border-left-width',
36    'border-width',
37    'border',
38    'bottom',
39    'caption-side',
40    'clear',
41    'clip',
42    'color',
43    'content',
44    'counter-increment',
45    'counter-reset',
46    'cue-after',
47    'cue-before',
48    'cue',
49    'cursor',
50    'direction',
51    'display',
52    'elevation',
53    'empty-cells',
54    'float',
55    'font-family',
56    'font-size',
57    'font-style',
58    'font-variant',
59    'font-weight',
60    'font',
61    'height',
62    'left',
63    'letter-spacing',
64    'line-height',
65    'list-style-image',
66    'list-style-position',
67    'list-style-type',
68    'list-style',
69    'margin-right',
70    'margin-left',
71    'margin-top',
72    'margin-bottom',
73    'margin',
74    'max-height',
75    'max-width',
76    'min-height',
77    'min-width',
78    'orphans',
79    'outline-color',
80    'outline-style',
81    'outline-width',
82    'outline',
83    'overflow',
84    'padding-top',
85    'padding-right',
86    'padding-bottom',
87    'padding-left',
88    'padding',
89    'page-break-after',
90    'page-break-before',
91    'page-break-inside',
92    'pause-after',
93    'pause-before',
94    'pause',
95    'pitch-range',
96    'pitch',
97    'play-during',
98    'position',
99    'quotes',
100    'richness',
101    'right',
102    'speak-header',
103    'speak-numeral',
104    'speak-punctuation',
105    'speak',
106    'speech-rate',
107    'stress',
108    'table-layout',
109    'text-align',
110    'text-decoration',
111    'text-indent',
112    'text-transform',
113    'top',
114    'unicode-bidi',
115    'vertical-align',
116    'visibility',
117    'voice-family',
118    'volume',
119    'white-space',
120    'widows',
121    'width',
122    'word-spacing',
123    'z-index',
124]
125css3 = [
126    'alignment-adjust',
127    'alignment-baseline',
128    'animation',
129    'animation-delay',
130    'animation-direction',
131    'animation-duration',
132    'animation-iteration-count',
133    'animation-name',
134    'animation-play-state',
135    'animation-timing-function',
136    'appearance',
137    'backface-visibility',
138    'background-clip',
139    'background-origin',
140    'background-size',
141    'baseline-shift',
142    'bookmark-label',
143    'bookmark-level',
144    'bookmark-target',
145    'border-bottom-left-radius',
146    'border-bottom-right-radius',
147    'border-image',
148    'border-image-outset',
149    'border-image-repeat',
150    'border-image-slice',
151    'border-image-source',
152    'border-image-width',
153    'border-radius',
154    'border-top-left-radius',
155    'border-top-right-radius',
156    'box-align',
157    'box-decoration-break',
158    'box-direction',
159    'box-flex',
160    'box-flex-group',
161    'box-lines',
162    'box-ordinal-group',
163    'box-orient',
164    'box-pack',
165    'box-shadow',
166    'box-sizing',
167    'color-profile',
168    'column-count',
169    'column-fill',
170    'column-gap',
171    'column-rule',
172    'column-rule-color',
173    'column-rule-style',
174    'column-rule-width',
175    'column-span',
176    'column-width',
177    'columns',
178    'crop',
179    'dominant-baseline',
180    'drop-initial-after-adjust',
181    'drop-initial-after-align',
182    'drop-initial-before-adjust',
183    'drop-initial-before-align',
184    'drop-initial-size',
185    'drop-initial-value',
186    'fit',
187    'fit-position',
188    'float-offset',
189    'font-size-adjust',
190    'font-stretch',
191    'grid-columns',
192    'grid-rows',
193    'hanging-punctuation',
194    'hyphenate-after',
195    'hyphenate-before',
196    'hyphenate-character',
197    'hyphenate-lines',
198    'hyphenate-resource',
199    'hyphens',
200    'icon',
201    'image-orientation',
202    'image-resolution',
203    'inline-box-align',
204    'line-stacking',
205    'line-stacking-ruby',
206    'line-stacking-shift',
207    'line-stacking-strategy',
208    #    'mark',
209    'mark-after',
210    'mark-before',
211    'marks',
212    'marquee-direction',
213    'marquee-play-count',
214    'marquee-speed',
215    'marquee-style',
216    'move-to',
217    'nav-down',
218    'nav-index',
219    'nav-left',
220    'nav-right',
221    'nav-up',
222    'opacity',
223    'outline-offset',
224    'overflow-style',
225    'overflow-x',
226    'overflow-y',
227    'page',
228    'page-policy',
229    'perspective',
230    'perspective-origin',
231    'phonemes',
232    'punctuation-trim',
233    'rendering-intent',
234    'resize',
235    'rest',
236    'rest-after',
237    'rest-before',
238    'rotation',
239    'rotation-point',
240    'ruby-align',
241    'ruby-overhang',
242    'ruby-position',
243    'ruby-span',
244    'size',
245    'string-set',
246    'target',
247    'target-name',
248    'target-new',
249    'target-position',
250    'text-align-last',
251    'text-height',
252    'text-justify',
253    'text-outline',
254    'text-overflow',
255    'text-shadow',
256    'text-wrap',
257    'transform',
258    'transform-origin',
259    'transform-style',
260    'transition',
261    'transition-delay',
262    'transition-duration',
263    'transition-property',
264    'transition-timing-function',
265    'voice-balance',
266    'voice-duration',
267    'voice-pitch',
268    'voice-pitch-range',
269    'voice-rate',
270    'voice-stress',
271    'voice-volume',
272    'word-break',
273    'word-wrap'
274]
275# SVG only includes style not present in either css2 or css3:
276svg = [
277    # clipping / masking / compositing:
278    'clip-path',
279    'clip-rule',
280    'mask',
281    # filter effects:
282    'enable-background',
283    'filter',
284    'flood-color',
285    'flood-opacity',
286    'lightning-color',
287    # gradient:
288    'stop-color',
289    'stop-opacity',
290    # interactivity:
291    'pointer-events',
292    # color / painting:
293    'color-interpolation',
294    'color-interpolation-filters',
295    'color-rendering',
296    'fill',
297    'fill-opacity',
298    'fill-rule',
299    'image-rendering',
300    'marker',
301    'marker-end',
302    'marker-mid',
303    'marker-start',
304    'shape-rendering',
305    'stroke',
306    'stroke-dasharray',
307    'stroke-dashoffset',
308    'stroke-linecap',
309    'stroke-linejoin',
310    'stroke-miterlimit',
311    'stroke-opacity',
312    'stroke-width',
313    'text-rendering',
314    # text:
315    'glyph-orientation-horizontal',
316    'glyph-orientation-vertical',
317    'kerning',
318    'text-anchor',
319    'writing-mode',
320]
321vendor_prefix = [
322    '-ms-',
323    '-moz-',
324    '-o-',
325    '-atsc-',
326    '-wap-',
327    '-webkit-',
328    '-khtml-'
329    '-xv-',
330    'mso-',
331]
332vendor_ugly = [
333    'accelerator',
334    'behavior',
335    'zoom',
336]
337properties = css2 + css3 + svg + vendor_ugly
338
339# CSS-2(.1) media types: http://www.w3.org/TR/CSS2/media.html#media-types
340# Include media types as defined in HTML4: http://www.w3.org/TR/1999/REC-html401-19991224/types.html#h-6.13
341# Also explained in http://www.w3.org/TR/css3-mediaqueries/#background
342html4_media_types = [
343    'all',
344    'aural',  # deprecated by CSS 2.1, which reserves "speech"
345    'braille',
346    'handheld',
347    'print',
348    'projection',
349    'screen',
350    'tty',
351    'tv',
352]
353css2_media_types = [
354    'embossed',  # CSS2, not HTML4
355    'speech',  # CSS2. not HTML4
356]
357media_types = html4_media_types + css2_media_types
358
359css3_media_features = [
360    'width',
361    'min-width',
362    'max-width',
363    'height',
364    'min-height',
365    'max-height',
366    'device-width',
367    'min-device-width',
368    'max-device-width',
369    'device-height',
370    'min-device-height',
371    'max-device-height',
372    'orientation',
373    'aspect-ratio',
374    'min-aspect-ratio',
375    'max-aspect-ratio',
376    'device-aspect-ratio',
377    'min-device-aspect-ratio',
378    'max-device-aspect-ratio',
379    'color',
380    'min-color',
381    'max-color',
382    'color-index',
383    'min-color-index',
384    'max-color-index',
385    'monochrome',
386    'min-monochrome',
387    'max-monochrome',
388    'resolution',
389    'min-resolution',
390    'max-resolution',
391    'scan',
392    'grid',
393]
394vendor_media_features = [
395    '-webkit-min-device-pixel-ratio',
396    'min--moz-device-pixel-ratio',
397    '-o-min-device-pixel-ratio',
398    'min-device-pixel-ratio',
399]
400media_features = css3_media_features + vendor_media_features
401