1 | let unpack = require('caniuse-lite/dist/unpacker/feature')
|
2 |
|
3 | function browsersSort(a, b) {
|
4 | a = a.split(' ')
|
5 | b = b.split(' ')
|
6 | if (a[0] > b[0]) {
|
7 | return 1
|
8 | } else if (a[0] < b[0]) {
|
9 | return -1
|
10 | } else {
|
11 | return Math.sign(parseFloat(a[1]) - parseFloat(b[1]))
|
12 | }
|
13 | }
|
14 |
|
15 |
|
16 | function f(data, opts, callback) {
|
17 | data = unpack(data)
|
18 |
|
19 | if (!callback) {
|
20 | ;[callback, opts] = [opts, {}]
|
21 | }
|
22 |
|
23 | let match = opts.match || /\sx($|\s)/
|
24 | let need = []
|
25 |
|
26 | for (let browser in data.stats) {
|
27 | let versions = data.stats[browser]
|
28 | for (let version in versions) {
|
29 | let support = versions[version]
|
30 | if (support.match(match)) {
|
31 | need.push(browser + ' ' + version)
|
32 | }
|
33 | }
|
34 | }
|
35 |
|
36 | callback(need.sort(browsersSort))
|
37 | }
|
38 |
|
39 |
|
40 | let result = {}
|
41 |
|
42 | function prefix(names, data) {
|
43 | for (let name of names) {
|
44 | result[name] = Object.assign({}, data)
|
45 | }
|
46 | }
|
47 |
|
48 | function add(names, data) {
|
49 | for (let name of names) {
|
50 | result[name].browsers = result[name].browsers
|
51 | .concat(data.browsers)
|
52 | .sort(browsersSort)
|
53 | }
|
54 | }
|
55 |
|
56 | module.exports = result
|
57 |
|
58 |
|
59 | let prefixBorderRadius = require('caniuse-lite/data/features/border-radius')
|
60 |
|
61 | f(prefixBorderRadius, browsers =>
|
62 | prefix(
|
63 | [
|
64 | 'border-radius',
|
65 | 'border-top-left-radius',
|
66 | 'border-top-right-radius',
|
67 | 'border-bottom-right-radius',
|
68 | 'border-bottom-left-radius'
|
69 | ],
|
70 | {
|
71 | mistakes: ['-khtml-', '-ms-', '-o-'],
|
72 | feature: 'border-radius',
|
73 | browsers
|
74 | }
|
75 | )
|
76 | )
|
77 |
|
78 |
|
79 | let prefixBoxshadow = require('caniuse-lite/data/features/css-boxshadow')
|
80 |
|
81 | f(prefixBoxshadow, browsers =>
|
82 | prefix(['box-shadow'], {
|
83 | mistakes: ['-khtml-'],
|
84 | feature: 'css-boxshadow',
|
85 | browsers
|
86 | })
|
87 | )
|
88 |
|
89 |
|
90 | let prefixAnimation = require('caniuse-lite/data/features/css-animation')
|
91 |
|
92 | f(prefixAnimation, browsers =>
|
93 | prefix(
|
94 | [
|
95 | 'animation',
|
96 | 'animation-name',
|
97 | 'animation-duration',
|
98 | 'animation-delay',
|
99 | 'animation-direction',
|
100 | 'animation-fill-mode',
|
101 | 'animation-iteration-count',
|
102 | 'animation-play-state',
|
103 | 'animation-timing-function',
|
104 | '@keyframes'
|
105 | ],
|
106 | {
|
107 | mistakes: ['-khtml-', '-ms-'],
|
108 | feature: 'css-animation',
|
109 | browsers
|
110 | }
|
111 | )
|
112 | )
|
113 |
|
114 |
|
115 | let prefixTransition = require('caniuse-lite/data/features/css-transitions')
|
116 |
|
117 | f(prefixTransition, browsers =>
|
118 | prefix(
|
119 | [
|
120 | 'transition',
|
121 | 'transition-property',
|
122 | 'transition-duration',
|
123 | 'transition-delay',
|
124 | 'transition-timing-function'
|
125 | ],
|
126 | {
|
127 | mistakes: ['-khtml-', '-ms-'],
|
128 | browsers,
|
129 | feature: 'css-transitions'
|
130 | }
|
131 | )
|
132 | )
|
133 |
|
134 |
|
135 | let prefixTransform2d = require('caniuse-lite/data/features/transforms2d')
|
136 |
|
137 | f(prefixTransform2d, browsers =>
|
138 | prefix(['transform', 'transform-origin'], {
|
139 | feature: 'transforms2d',
|
140 | browsers
|
141 | })
|
142 | )
|
143 |
|
144 |
|
145 | let prefixTransforms3d = require('caniuse-lite/data/features/transforms3d')
|
146 |
|
147 | f(prefixTransforms3d, browsers => {
|
148 | prefix(['perspective', 'perspective-origin'], {
|
149 | feature: 'transforms3d',
|
150 | browsers
|
151 | })
|
152 | return prefix(['transform-style'], {
|
153 | mistakes: ['-ms-', '-o-'],
|
154 | browsers,
|
155 | feature: 'transforms3d'
|
156 | })
|
157 | })
|
158 |
|
159 | f(prefixTransforms3d, { match: /y\sx|y\s#2/ }, browsers =>
|
160 | prefix(['backface-visibility'], {
|
161 | mistakes: ['-ms-', '-o-'],
|
162 | feature: 'transforms3d',
|
163 | browsers
|
164 | })
|
165 | )
|
166 |
|
167 |
|
168 | let prefixGradients = require('caniuse-lite/data/features/css-gradients')
|
169 |
|
170 | f(prefixGradients, { match: /y\sx/ }, browsers =>
|
171 | prefix(
|
172 | [
|
173 | 'linear-gradient',
|
174 | 'repeating-linear-gradient',
|
175 | 'radial-gradient',
|
176 | 'repeating-radial-gradient'
|
177 | ],
|
178 | {
|
179 | props: [
|
180 | 'background',
|
181 | 'background-image',
|
182 | 'border-image',
|
183 | 'mask',
|
184 | 'list-style',
|
185 | 'list-style-image',
|
186 | 'content',
|
187 | 'mask-image'
|
188 | ],
|
189 | mistakes: ['-ms-'],
|
190 | feature: 'css-gradients',
|
191 | browsers
|
192 | }
|
193 | )
|
194 | )
|
195 |
|
196 | f(prefixGradients, { match: /a\sx/ }, browsers => {
|
197 | browsers = browsers.map(i => {
|
198 | if (/firefox|op/.test(i)) {
|
199 | return i
|
200 | } else {
|
201 | return `${i} old`
|
202 | }
|
203 | })
|
204 | return add(
|
205 | [
|
206 | 'linear-gradient',
|
207 | 'repeating-linear-gradient',
|
208 | 'radial-gradient',
|
209 | 'repeating-radial-gradient'
|
210 | ],
|
211 | {
|
212 | feature: 'css-gradients',
|
213 | browsers
|
214 | }
|
215 | )
|
216 | })
|
217 |
|
218 |
|
219 | let prefixBoxsizing = require('caniuse-lite/data/features/css3-boxsizing')
|
220 |
|
221 | f(prefixBoxsizing, browsers =>
|
222 | prefix(['box-sizing'], {
|
223 | feature: 'css3-boxsizing',
|
224 | browsers
|
225 | })
|
226 | )
|
227 |
|
228 |
|
229 | let prefixFilters = require('caniuse-lite/data/features/css-filters')
|
230 |
|
231 | f(prefixFilters, browsers =>
|
232 | prefix(['filter'], {
|
233 | feature: 'css-filters',
|
234 | browsers
|
235 | })
|
236 | )
|
237 |
|
238 |
|
239 | let prefixFilterFunction = require('caniuse-lite/data/features/css-filter-function')
|
240 |
|
241 | f(prefixFilterFunction, browsers =>
|
242 | prefix(['filter-function'], {
|
243 | props: [
|
244 | 'background',
|
245 | 'background-image',
|
246 | 'border-image',
|
247 | 'mask',
|
248 | 'list-style',
|
249 | 'list-style-image',
|
250 | 'content',
|
251 | 'mask-image'
|
252 | ],
|
253 | feature: 'css-filter-function',
|
254 | browsers
|
255 | })
|
256 | )
|
257 |
|
258 |
|
259 | let prefixBackdrop = require('caniuse-lite/data/features/css-backdrop-filter')
|
260 |
|
261 | f(prefixBackdrop, { match: /y\sx|y\s#2/ }, browsers =>
|
262 | prefix(['backdrop-filter'], {
|
263 | feature: 'css-backdrop-filter',
|
264 | browsers
|
265 | })
|
266 | )
|
267 |
|
268 |
|
269 | let prefixElementFunction = require('caniuse-lite/data/features/css-element-function')
|
270 |
|
271 | f(prefixElementFunction, browsers =>
|
272 | prefix(['element'], {
|
273 | props: [
|
274 | 'background',
|
275 | 'background-image',
|
276 | 'border-image',
|
277 | 'mask',
|
278 | 'list-style',
|
279 | 'list-style-image',
|
280 | 'content',
|
281 | 'mask-image'
|
282 | ],
|
283 | feature: 'css-element-function',
|
284 | browsers
|
285 | })
|
286 | )
|
287 |
|
288 |
|
289 | let prefixMulticolumns = require('caniuse-lite/data/features/multicolumn')
|
290 |
|
291 | f(prefixMulticolumns, browsers => {
|
292 | prefix(
|
293 | [
|
294 | 'columns',
|
295 | 'column-width',
|
296 | 'column-gap',
|
297 | 'column-rule',
|
298 | 'column-rule-color',
|
299 | 'column-rule-width',
|
300 | 'column-count',
|
301 | 'column-rule-style',
|
302 | 'column-span',
|
303 | 'column-fill'
|
304 | ],
|
305 | {
|
306 | feature: 'multicolumn',
|
307 | browsers
|
308 | }
|
309 | )
|
310 |
|
311 | let noff = browsers.filter(i => !/firefox/.test(i))
|
312 | prefix(['break-before', 'break-after', 'break-inside'], {
|
313 | feature: 'multicolumn',
|
314 | browsers: noff
|
315 | })
|
316 | })
|
317 |
|
318 |
|
319 | let prefixUserSelect = require('caniuse-lite/data/features/user-select-none')
|
320 |
|
321 | f(prefixUserSelect, browsers =>
|
322 | prefix(['user-select'], {
|
323 | mistakes: ['-khtml-'],
|
324 | feature: 'user-select-none',
|
325 | browsers
|
326 | })
|
327 | )
|
328 |
|
329 |
|
330 | let prefixFlexbox = require('caniuse-lite/data/features/flexbox')
|
331 |
|
332 | f(prefixFlexbox, { match: /a\sx/ }, browsers => {
|
333 | browsers = browsers.map(i => {
|
334 | if (/ie|firefox/.test(i)) {
|
335 | return i
|
336 | } else {
|
337 | return `${i} 2009`
|
338 | }
|
339 | })
|
340 | prefix(['display-flex', 'inline-flex'], {
|
341 | props: ['display'],
|
342 | feature: 'flexbox',
|
343 | browsers
|
344 | })
|
345 | prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
346 | feature: 'flexbox',
|
347 | browsers
|
348 | })
|
349 | prefix(
|
350 | [
|
351 | 'flex-direction',
|
352 | 'flex-wrap',
|
353 | 'flex-flow',
|
354 | 'justify-content',
|
355 | 'order',
|
356 | 'align-items',
|
357 | 'align-self',
|
358 | 'align-content'
|
359 | ],
|
360 | {
|
361 | feature: 'flexbox',
|
362 | browsers
|
363 | }
|
364 | )
|
365 | })
|
366 |
|
367 | f(prefixFlexbox, { match: /y\sx/ }, browsers => {
|
368 | add(['display-flex', 'inline-flex'], {
|
369 | feature: 'flexbox',
|
370 | browsers
|
371 | })
|
372 | add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
373 | feature: 'flexbox',
|
374 | browsers
|
375 | })
|
376 | add(
|
377 | [
|
378 | 'flex-direction',
|
379 | 'flex-wrap',
|
380 | 'flex-flow',
|
381 | 'justify-content',
|
382 | 'order',
|
383 | 'align-items',
|
384 | 'align-self',
|
385 | 'align-content'
|
386 | ],
|
387 | {
|
388 | feature: 'flexbox',
|
389 | browsers
|
390 | }
|
391 | )
|
392 | })
|
393 |
|
394 |
|
395 | let prefixCalc = require('caniuse-lite/data/features/calc')
|
396 |
|
397 | f(prefixCalc, browsers =>
|
398 | prefix(['calc'], {
|
399 | props: ['*'],
|
400 | feature: 'calc',
|
401 | browsers
|
402 | })
|
403 | )
|
404 |
|
405 |
|
406 | let prefixBackgroundOptions = require('caniuse-lite/data/features/background-img-opts')
|
407 |
|
408 | f(prefixBackgroundOptions, browsers =>
|
409 | prefix(['background-origin', 'background-size'], {
|
410 | feature: 'background-img-opts',
|
411 | browsers
|
412 | })
|
413 | )
|
414 |
|
415 |
|
416 | let prefixBackgroundClipText = require('caniuse-lite/data/features/background-clip-text')
|
417 |
|
418 | f(prefixBackgroundClipText, browsers =>
|
419 | prefix(['background-clip'], {
|
420 | feature: 'background-clip-text',
|
421 | browsers
|
422 | })
|
423 | )
|
424 |
|
425 |
|
426 | let prefixFontFeature = require('caniuse-lite/data/features/font-feature')
|
427 |
|
428 | f(prefixFontFeature, browsers =>
|
429 | prefix(
|
430 | [
|
431 | 'font-feature-settings',
|
432 | 'font-variant-ligatures',
|
433 | 'font-language-override'
|
434 | ],
|
435 | {
|
436 | feature: 'font-feature',
|
437 | browsers
|
438 | }
|
439 | )
|
440 | )
|
441 |
|
442 |
|
443 | let prefixFontKerning = require('caniuse-lite/data/features/font-kerning')
|
444 |
|
445 | f(prefixFontKerning, browsers =>
|
446 | prefix(['font-kerning'], {
|
447 | feature: 'font-kerning',
|
448 | browsers
|
449 | })
|
450 | )
|
451 |
|
452 |
|
453 | let prefixBorderImage = require('caniuse-lite/data/features/border-image')
|
454 |
|
455 | f(prefixBorderImage, browsers =>
|
456 | prefix(['border-image'], {
|
457 | feature: 'border-image',
|
458 | browsers
|
459 | })
|
460 | )
|
461 |
|
462 |
|
463 | let prefixSelection = require('caniuse-lite/data/features/css-selection')
|
464 |
|
465 | f(prefixSelection, browsers =>
|
466 | prefix(['::selection'], {
|
467 | selector: true,
|
468 | feature: 'css-selection',
|
469 | browsers
|
470 | })
|
471 | )
|
472 |
|
473 |
|
474 | let prefixPlaceholder = require('caniuse-lite/data/features/css-placeholder')
|
475 |
|
476 | f(prefixPlaceholder, browsers => {
|
477 | prefix(['::placeholder'], {
|
478 | selector: true,
|
479 | feature: 'css-placeholder',
|
480 | browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old'])
|
481 | })
|
482 | })
|
483 |
|
484 |
|
485 | let prefixPlaceholderShown = require('caniuse-lite/data/features/css-placeholder-shown')
|
486 |
|
487 | f(prefixPlaceholderShown, browsers => {
|
488 | prefix([':placeholder-shown'], {
|
489 | selector: true,
|
490 | feature: 'css-placeholder-shown',
|
491 | browsers
|
492 | })
|
493 | })
|
494 |
|
495 |
|
496 | let prefixHyphens = require('caniuse-lite/data/features/css-hyphens')
|
497 |
|
498 | f(prefixHyphens, browsers =>
|
499 | prefix(['hyphens'], {
|
500 | feature: 'css-hyphens',
|
501 | browsers
|
502 | })
|
503 | )
|
504 |
|
505 |
|
506 | let prefixFullscreen = require('caniuse-lite/data/features/fullscreen')
|
507 |
|
508 | f(prefixFullscreen, browsers =>
|
509 | prefix([':fullscreen'], {
|
510 | selector: true,
|
511 | feature: 'fullscreen',
|
512 | browsers
|
513 | })
|
514 | )
|
515 |
|
516 | f(prefixFullscreen, { match: /x(\s#2|$)/ }, browsers =>
|
517 | prefix(['::backdrop'], {
|
518 | selector: true,
|
519 | feature: 'fullscreen',
|
520 | browsers
|
521 | })
|
522 | )
|
523 |
|
524 |
|
525 | let prefixFileSelectorButton = require('caniuse-lite/data/features/css-file-selector-button')
|
526 |
|
527 | f(prefixFileSelectorButton, browsers =>
|
528 | prefix(['::file-selector-button'], {
|
529 | selector: true,
|
530 | feature: 'file-selector-button',
|
531 | browsers
|
532 | })
|
533 | )
|
534 |
|
535 |
|
536 | let prefixAutofill = require('caniuse-lite/data/features/css-autofill')
|
537 |
|
538 | f(prefixAutofill, browsers =>
|
539 | prefix([':autofill'], {
|
540 | selector: true,
|
541 | feature: 'css-autofill',
|
542 | browsers
|
543 | })
|
544 | )
|
545 |
|
546 |
|
547 | let prefixTabsize = require('caniuse-lite/data/features/css3-tabsize')
|
548 |
|
549 | f(prefixTabsize, browsers =>
|
550 | prefix(['tab-size'], {
|
551 | feature: 'css3-tabsize',
|
552 | browsers
|
553 | })
|
554 | )
|
555 |
|
556 |
|
557 | let prefixIntrinsic = require('caniuse-lite/data/features/intrinsic-width')
|
558 |
|
559 | let sizeProps = [
|
560 | 'width',
|
561 | 'min-width',
|
562 | 'max-width',
|
563 | 'height',
|
564 | 'min-height',
|
565 | 'max-height',
|
566 | 'inline-size',
|
567 | 'min-inline-size',
|
568 | 'max-inline-size',
|
569 | 'block-size',
|
570 | 'min-block-size',
|
571 | 'max-block-size',
|
572 | 'grid',
|
573 | 'grid-template',
|
574 | 'grid-template-rows',
|
575 | 'grid-template-columns',
|
576 | 'grid-auto-columns',
|
577 | 'grid-auto-rows'
|
578 | ]
|
579 |
|
580 | f(prefixIntrinsic, browsers =>
|
581 | prefix(['max-content', 'min-content'], {
|
582 | props: sizeProps,
|
583 | feature: 'intrinsic-width',
|
584 | browsers
|
585 | })
|
586 | )
|
587 |
|
588 | f(prefixIntrinsic, { match: /x|\s#4/ }, browsers =>
|
589 | prefix(['fill', 'fill-available'], {
|
590 | props: sizeProps,
|
591 | feature: 'intrinsic-width',
|
592 | browsers
|
593 | })
|
594 | )
|
595 |
|
596 | f(prefixIntrinsic, { match: /x|\s#5/ }, browsers =>
|
597 | prefix(['fit-content'], {
|
598 | props: sizeProps,
|
599 | feature: 'intrinsic-width',
|
600 | browsers
|
601 | })
|
602 | )
|
603 |
|
604 |
|
605 |
|
606 | let prefixStretch = require('caniuse-lite/data/features/css-width-stretch')
|
607 |
|
608 | f(prefixStretch, browsers =>
|
609 | prefix(['stretch'], {
|
610 | props: sizeProps,
|
611 | feature: 'css-width-stretch',
|
612 | browsers
|
613 | })
|
614 | )
|
615 |
|
616 |
|
617 | let prefixCursorsNewer = require('caniuse-lite/data/features/css3-cursors-newer')
|
618 |
|
619 | f(prefixCursorsNewer, browsers =>
|
620 | prefix(['zoom-in', 'zoom-out'], {
|
621 | props: ['cursor'],
|
622 | feature: 'css3-cursors-newer',
|
623 | browsers
|
624 | })
|
625 | )
|
626 |
|
627 |
|
628 | let prefixCursorsGrab = require('caniuse-lite/data/features/css3-cursors-grab')
|
629 |
|
630 | f(prefixCursorsGrab, browsers =>
|
631 | prefix(['grab', 'grabbing'], {
|
632 | props: ['cursor'],
|
633 | feature: 'css3-cursors-grab',
|
634 | browsers
|
635 | })
|
636 | )
|
637 |
|
638 |
|
639 | let prefixSticky = require('caniuse-lite/data/features/css-sticky')
|
640 |
|
641 | f(prefixSticky, browsers =>
|
642 | prefix(['sticky'], {
|
643 | props: ['position'],
|
644 | feature: 'css-sticky',
|
645 | browsers
|
646 | })
|
647 | )
|
648 |
|
649 |
|
650 | let prefixPointer = require('caniuse-lite/data/features/pointer')
|
651 |
|
652 | f(prefixPointer, browsers =>
|
653 | prefix(['touch-action'], {
|
654 | feature: 'pointer',
|
655 | browsers
|
656 | })
|
657 | )
|
658 |
|
659 |
|
660 | let prefixDecoration = require('caniuse-lite/data/features/text-decoration')
|
661 |
|
662 | f(prefixDecoration, { match: /x.*#[235]/ }, browsers =>
|
663 | prefix(['text-decoration-skip', 'text-decoration-skip-ink'], {
|
664 | feature: 'text-decoration',
|
665 | browsers
|
666 | })
|
667 | )
|
668 |
|
669 | let prefixDecorationShorthand = require('caniuse-lite/data/features/mdn-text-decoration-shorthand')
|
670 |
|
671 | f(prefixDecorationShorthand, browsers =>
|
672 | prefix(['text-decoration'], {
|
673 | feature: 'text-decoration',
|
674 | browsers
|
675 | })
|
676 | )
|
677 |
|
678 | let prefixDecorationColor = require('caniuse-lite/data/features/mdn-text-decoration-color')
|
679 |
|
680 | f(prefixDecorationColor, browsers =>
|
681 | prefix(['text-decoration-color'], {
|
682 | feature: 'text-decoration',
|
683 | browsers
|
684 | })
|
685 | )
|
686 |
|
687 | let prefixDecorationLine = require('caniuse-lite/data/features/mdn-text-decoration-line')
|
688 |
|
689 | f(prefixDecorationLine, browsers =>
|
690 | prefix(['text-decoration-line'], {
|
691 | feature: 'text-decoration',
|
692 | browsers
|
693 | })
|
694 | )
|
695 |
|
696 | let prefixDecorationStyle = require('caniuse-lite/data/features/mdn-text-decoration-style')
|
697 |
|
698 | f(prefixDecorationStyle, browsers =>
|
699 | prefix(['text-decoration-style'], {
|
700 | feature: 'text-decoration',
|
701 | browsers
|
702 | })
|
703 | )
|
704 |
|
705 |
|
706 | let prefixTextSizeAdjust = require('caniuse-lite/data/features/text-size-adjust')
|
707 |
|
708 | f(prefixTextSizeAdjust, browsers =>
|
709 | prefix(['text-size-adjust'], {
|
710 | feature: 'text-size-adjust',
|
711 | browsers
|
712 | })
|
713 | )
|
714 |
|
715 |
|
716 | let prefixCssMasks = require('caniuse-lite/data/features/css-masks')
|
717 |
|
718 | f(prefixCssMasks, browsers => {
|
719 | prefix(
|
720 | [
|
721 | 'mask-clip',
|
722 | 'mask-composite',
|
723 | 'mask-image',
|
724 | 'mask-origin',
|
725 | 'mask-repeat',
|
726 | 'mask-border-repeat',
|
727 | 'mask-border-source'
|
728 | ],
|
729 | {
|
730 | feature: 'css-masks',
|
731 | browsers
|
732 | }
|
733 | )
|
734 | prefix(
|
735 | [
|
736 | 'mask',
|
737 | 'mask-position',
|
738 | 'mask-size',
|
739 | 'mask-border',
|
740 | 'mask-border-outset',
|
741 | 'mask-border-width',
|
742 | 'mask-border-slice'
|
743 | ],
|
744 | {
|
745 | feature: 'css-masks',
|
746 | browsers
|
747 | }
|
748 | )
|
749 | })
|
750 |
|
751 |
|
752 | let prefixClipPath = require('caniuse-lite/data/features/css-clip-path')
|
753 |
|
754 | f(prefixClipPath, browsers =>
|
755 | prefix(['clip-path'], {
|
756 | feature: 'css-clip-path',
|
757 | browsers
|
758 | })
|
759 | )
|
760 |
|
761 |
|
762 | let prefixBoxdecoration = require('caniuse-lite/data/features/css-boxdecorationbreak')
|
763 |
|
764 | f(prefixBoxdecoration, browsers =>
|
765 | prefix(['box-decoration-break'], {
|
766 | feature: 'css-boxdecorationbreak',
|
767 | browsers
|
768 | })
|
769 | )
|
770 |
|
771 |
|
772 | let prefixObjectFit = require('caniuse-lite/data/features/object-fit')
|
773 |
|
774 | f(prefixObjectFit, browsers =>
|
775 | prefix(['object-fit', 'object-position'], {
|
776 | feature: 'object-fit',
|
777 | browsers
|
778 | })
|
779 | )
|
780 |
|
781 |
|
782 | let prefixShapes = require('caniuse-lite/data/features/css-shapes')
|
783 |
|
784 | f(prefixShapes, browsers =>
|
785 | prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], {
|
786 | feature: 'css-shapes',
|
787 | browsers
|
788 | })
|
789 | )
|
790 |
|
791 |
|
792 | let prefixTextOverflow = require('caniuse-lite/data/features/text-overflow')
|
793 |
|
794 | f(prefixTextOverflow, browsers =>
|
795 | prefix(['text-overflow'], {
|
796 | feature: 'text-overflow',
|
797 | browsers
|
798 | })
|
799 | )
|
800 |
|
801 |
|
802 | let prefixDeviceadaptation = require('caniuse-lite/data/features/css-deviceadaptation')
|
803 |
|
804 | f(prefixDeviceadaptation, browsers =>
|
805 | prefix(['@viewport'], {
|
806 | feature: 'css-deviceadaptation',
|
807 | browsers
|
808 | })
|
809 | )
|
810 |
|
811 |
|
812 | let prefixResolut = require('caniuse-lite/data/features/css-media-resolution')
|
813 |
|
814 | f(prefixResolut, { match: /( x($| )|a #2)/ }, browsers =>
|
815 | prefix(['@resolution'], {
|
816 | feature: 'css-media-resolution',
|
817 | browsers
|
818 | })
|
819 | )
|
820 |
|
821 |
|
822 | let prefixTextAlignLast = require('caniuse-lite/data/features/css-text-align-last')
|
823 |
|
824 | f(prefixTextAlignLast, browsers =>
|
825 | prefix(['text-align-last'], {
|
826 | feature: 'css-text-align-last',
|
827 | browsers
|
828 | })
|
829 | )
|
830 |
|
831 |
|
832 | let prefixCrispedges = require('caniuse-lite/data/features/css-crisp-edges')
|
833 |
|
834 | f(prefixCrispedges, { match: /y x|a x #1/ }, browsers =>
|
835 | prefix(['pixelated'], {
|
836 | props: ['image-rendering'],
|
837 | feature: 'css-crisp-edges',
|
838 | browsers
|
839 | })
|
840 | )
|
841 |
|
842 | f(prefixCrispedges, { match: /a x #2/ }, browsers =>
|
843 | prefix(['image-rendering'], {
|
844 | feature: 'css-crisp-edges',
|
845 | browsers
|
846 | })
|
847 | )
|
848 |
|
849 |
|
850 | let prefixLogicalProps = require('caniuse-lite/data/features/css-logical-props')
|
851 |
|
852 | f(prefixLogicalProps, browsers =>
|
853 | prefix(
|
854 | [
|
855 | 'border-inline-start',
|
856 | 'border-inline-end',
|
857 | 'margin-inline-start',
|
858 | 'margin-inline-end',
|
859 | 'padding-inline-start',
|
860 | 'padding-inline-end'
|
861 | ],
|
862 | {
|
863 | feature: 'css-logical-props',
|
864 | browsers
|
865 | }
|
866 | )
|
867 | )
|
868 |
|
869 | f(prefixLogicalProps, { match: /x\s#2/ }, browsers =>
|
870 | prefix(
|
871 | [
|
872 | 'border-block-start',
|
873 | 'border-block-end',
|
874 | 'margin-block-start',
|
875 | 'margin-block-end',
|
876 | 'padding-block-start',
|
877 | 'padding-block-end'
|
878 | ],
|
879 | {
|
880 | feature: 'css-logical-props',
|
881 | browsers
|
882 | }
|
883 | )
|
884 | )
|
885 |
|
886 |
|
887 | let prefixAppearance = require('caniuse-lite/data/features/css-appearance')
|
888 |
|
889 | f(prefixAppearance, { match: /#2|x/ }, browsers =>
|
890 | prefix(['appearance'], {
|
891 | feature: 'css-appearance',
|
892 | browsers
|
893 | })
|
894 | )
|
895 |
|
896 |
|
897 | let prefixSnappoints = require('caniuse-lite/data/features/css-snappoints')
|
898 |
|
899 | f(prefixSnappoints, browsers =>
|
900 | prefix(
|
901 | [
|
902 | 'scroll-snap-type',
|
903 | 'scroll-snap-coordinate',
|
904 | 'scroll-snap-destination',
|
905 | 'scroll-snap-points-x',
|
906 | 'scroll-snap-points-y'
|
907 | ],
|
908 | {
|
909 | feature: 'css-snappoints',
|
910 | browsers
|
911 | }
|
912 | )
|
913 | )
|
914 |
|
915 |
|
916 | let prefixRegions = require('caniuse-lite/data/features/css-regions')
|
917 |
|
918 | f(prefixRegions, browsers =>
|
919 | prefix(['flow-into', 'flow-from', 'region-fragment'], {
|
920 | feature: 'css-regions',
|
921 | browsers
|
922 | })
|
923 | )
|
924 |
|
925 |
|
926 | let prefixImageSet = require('caniuse-lite/data/features/css-image-set')
|
927 |
|
928 | f(prefixImageSet, browsers =>
|
929 | prefix(['image-set'], {
|
930 | props: [
|
931 | 'background',
|
932 | 'background-image',
|
933 | 'border-image',
|
934 | 'cursor',
|
935 | 'mask',
|
936 | 'mask-image',
|
937 | 'list-style',
|
938 | 'list-style-image',
|
939 | 'content'
|
940 | ],
|
941 | feature: 'css-image-set',
|
942 | browsers
|
943 | })
|
944 | )
|
945 |
|
946 |
|
947 | let prefixWritingMode = require('caniuse-lite/data/features/css-writing-mode')
|
948 |
|
949 | f(prefixWritingMode, { match: /a|x/ }, browsers =>
|
950 | prefix(['writing-mode'], {
|
951 | feature: 'css-writing-mode',
|
952 | browsers
|
953 | })
|
954 | )
|
955 |
|
956 |
|
957 | let prefixCrossFade = require('caniuse-lite/data/features/css-cross-fade')
|
958 |
|
959 | f(prefixCrossFade, browsers =>
|
960 | prefix(['cross-fade'], {
|
961 | props: [
|
962 | 'background',
|
963 | 'background-image',
|
964 | 'border-image',
|
965 | 'mask',
|
966 | 'list-style',
|
967 | 'list-style-image',
|
968 | 'content',
|
969 | 'mask-image'
|
970 | ],
|
971 | feature: 'css-cross-fade',
|
972 | browsers
|
973 | })
|
974 | )
|
975 |
|
976 |
|
977 | let prefixReadOnly = require('caniuse-lite/data/features/css-read-only-write')
|
978 |
|
979 | f(prefixReadOnly, browsers =>
|
980 | prefix([':read-only', ':read-write'], {
|
981 | selector: true,
|
982 | feature: 'css-read-only-write',
|
983 | browsers
|
984 | })
|
985 | )
|
986 |
|
987 |
|
988 | let prefixTextEmphasis = require('caniuse-lite/data/features/text-emphasis')
|
989 |
|
990 | f(prefixTextEmphasis, browsers =>
|
991 | prefix(
|
992 | [
|
993 | 'text-emphasis',
|
994 | 'text-emphasis-position',
|
995 | 'text-emphasis-style',
|
996 | 'text-emphasis-color'
|
997 | ],
|
998 | {
|
999 | feature: 'text-emphasis',
|
1000 | browsers
|
1001 | }
|
1002 | )
|
1003 | )
|
1004 |
|
1005 |
|
1006 | let prefixGrid = require('caniuse-lite/data/features/css-grid')
|
1007 |
|
1008 | f(prefixGrid, browsers => {
|
1009 | prefix(['display-grid', 'inline-grid'], {
|
1010 | props: ['display'],
|
1011 | feature: 'css-grid',
|
1012 | browsers
|
1013 | })
|
1014 | prefix(
|
1015 | [
|
1016 | 'grid-template-columns',
|
1017 | 'grid-template-rows',
|
1018 | 'grid-row-start',
|
1019 | 'grid-column-start',
|
1020 | 'grid-row-end',
|
1021 | 'grid-column-end',
|
1022 | 'grid-row',
|
1023 | 'grid-column',
|
1024 | 'grid-area',
|
1025 | 'grid-template',
|
1026 | 'grid-template-areas',
|
1027 | 'place-self'
|
1028 | ],
|
1029 | {
|
1030 | feature: 'css-grid',
|
1031 | browsers
|
1032 | }
|
1033 | )
|
1034 | })
|
1035 |
|
1036 | f(prefixGrid, { match: /a x/ }, browsers =>
|
1037 | prefix(['grid-column-align', 'grid-row-align'], {
|
1038 | feature: 'css-grid',
|
1039 | browsers
|
1040 | })
|
1041 | )
|
1042 |
|
1043 |
|
1044 | let prefixTextSpacing = require('caniuse-lite/data/features/css-text-spacing')
|
1045 |
|
1046 | f(prefixTextSpacing, browsers =>
|
1047 | prefix(['text-spacing'], {
|
1048 | feature: 'css-text-spacing',
|
1049 | browsers
|
1050 | })
|
1051 | )
|
1052 |
|
1053 |
|
1054 | let prefixAnyLink = require('caniuse-lite/data/features/css-any-link')
|
1055 |
|
1056 | f(prefixAnyLink, browsers =>
|
1057 | prefix([':any-link'], {
|
1058 | selector: true,
|
1059 | feature: 'css-any-link',
|
1060 | browsers
|
1061 | })
|
1062 | )
|
1063 |
|
1064 |
|
1065 |
|
1066 | let bidiIsolate = require('caniuse-lite/data/features/mdn-css-unicode-bidi-isolate')
|
1067 |
|
1068 | f(bidiIsolate, browsers =>
|
1069 | prefix(['isolate'], {
|
1070 | props: ['unicode-bidi'],
|
1071 | feature: 'css-unicode-bidi',
|
1072 | browsers
|
1073 | })
|
1074 | )
|
1075 |
|
1076 | let bidiPlaintext = require('caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext')
|
1077 |
|
1078 | f(bidiPlaintext, browsers =>
|
1079 | prefix(['plaintext'], {
|
1080 | props: ['unicode-bidi'],
|
1081 | feature: 'css-unicode-bidi',
|
1082 | browsers
|
1083 | })
|
1084 | )
|
1085 |
|
1086 | let bidiOverride = require('caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override')
|
1087 |
|
1088 | f(bidiOverride, { match: /y x/ }, browsers =>
|
1089 | prefix(['isolate-override'], {
|
1090 | props: ['unicode-bidi'],
|
1091 | feature: 'css-unicode-bidi',
|
1092 | browsers
|
1093 | })
|
1094 | )
|
1095 |
|
1096 |
|
1097 | let prefixOverscroll = require('caniuse-lite/data/features/css-overscroll-behavior')
|
1098 |
|
1099 | f(prefixOverscroll, { match: /a #1/ }, browsers =>
|
1100 | prefix(['overscroll-behavior'], {
|
1101 | feature: 'css-overscroll-behavior',
|
1102 | browsers
|
1103 | })
|
1104 | )
|
1105 |
|
1106 |
|
1107 | let prefixTextOrientation = require('caniuse-lite/data/features/css-text-orientation')
|
1108 |
|
1109 | f(prefixTextOrientation, browsers =>
|
1110 | prefix(['text-orientation'], {
|
1111 | feature: 'css-text-orientation',
|
1112 | browsers
|
1113 | })
|
1114 | )
|
1115 |
|
1116 |
|
1117 | let prefixPrintAdjust = require('caniuse-lite/data/features/css-print-color-adjust')
|
1118 |
|
1119 | f(prefixPrintAdjust, browsers =>
|
1120 | prefix(['print-color-adjust', 'color-adjust'], {
|
1121 | feature: 'css-print-color-adjust',
|
1122 | browsers
|
1123 | })
|
1124 | )
|