1 | "use strict";
|
---|
2 |
|
---|
3 | function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
|
---|
4 |
|
---|
5 | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
---|
6 |
|
---|
7 | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
---|
8 |
|
---|
9 | var unpack = require('caniuse-lite').feature;
|
---|
10 |
|
---|
11 | function browsersSort(a, b) {
|
---|
12 | a = a.split(' ');
|
---|
13 | b = b.split(' ');
|
---|
14 |
|
---|
15 | if (a[0] > b[0]) {
|
---|
16 | return 1;
|
---|
17 | } else if (a[0] < b[0]) {
|
---|
18 | return -1;
|
---|
19 | } else {
|
---|
20 | return Math.sign(parseFloat(a[1]) - parseFloat(b[1]));
|
---|
21 | }
|
---|
22 | } // Convert Can I Use data
|
---|
23 |
|
---|
24 |
|
---|
25 | function f(data, opts, callback) {
|
---|
26 | data = unpack(data);
|
---|
27 |
|
---|
28 | if (!callback) {
|
---|
29 | var _ref = [opts, {}];
|
---|
30 | callback = _ref[0];
|
---|
31 | opts = _ref[1];
|
---|
32 | }
|
---|
33 |
|
---|
34 | var match = opts.match || /\sx($|\s)/;
|
---|
35 | var need = [];
|
---|
36 |
|
---|
37 | for (var browser in data.stats) {
|
---|
38 | var versions = data.stats[browser];
|
---|
39 |
|
---|
40 | for (var version in versions) {
|
---|
41 | var support = versions[version];
|
---|
42 |
|
---|
43 | if (support.match(match)) {
|
---|
44 | need.push(browser + ' ' + version);
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|
48 |
|
---|
49 | callback(need.sort(browsersSort));
|
---|
50 | } // Add data for all properties
|
---|
51 |
|
---|
52 |
|
---|
53 | var result = {};
|
---|
54 |
|
---|
55 | function prefix(names, data) {
|
---|
56 | for (var _iterator = _createForOfIteratorHelperLoose(names), _step; !(_step = _iterator()).done;) {
|
---|
57 | var name = _step.value;
|
---|
58 | result[name] = Object.assign({}, data);
|
---|
59 | }
|
---|
60 | }
|
---|
61 |
|
---|
62 | function add(names, data) {
|
---|
63 | for (var _iterator2 = _createForOfIteratorHelperLoose(names), _step2; !(_step2 = _iterator2()).done;) {
|
---|
64 | var name = _step2.value;
|
---|
65 | result[name].browsers = result[name].browsers.concat(data.browsers).sort(browsersSort);
|
---|
66 | }
|
---|
67 | }
|
---|
68 |
|
---|
69 | module.exports = result; // Border Radius
|
---|
70 |
|
---|
71 | f(require('caniuse-lite/data/features/border-radius'), function (browsers) {
|
---|
72 | return prefix(['border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'], {
|
---|
73 | mistakes: ['-khtml-', '-ms-', '-o-'],
|
---|
74 | feature: 'border-radius',
|
---|
75 | browsers: browsers
|
---|
76 | });
|
---|
77 | }); // Box Shadow
|
---|
78 |
|
---|
79 | f(require('caniuse-lite/data/features/css-boxshadow'), function (browsers) {
|
---|
80 | return prefix(['box-shadow'], {
|
---|
81 | mistakes: ['-khtml-'],
|
---|
82 | feature: 'css-boxshadow',
|
---|
83 | browsers: browsers
|
---|
84 | });
|
---|
85 | }); // Animation
|
---|
86 |
|
---|
87 | f(require('caniuse-lite/data/features/css-animation'), function (browsers) {
|
---|
88 | return prefix(['animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes'], {
|
---|
89 | mistakes: ['-khtml-', '-ms-'],
|
---|
90 | feature: 'css-animation',
|
---|
91 | browsers: browsers
|
---|
92 | });
|
---|
93 | }); // Transition
|
---|
94 |
|
---|
95 | f(require('caniuse-lite/data/features/css-transitions'), function (browsers) {
|
---|
96 | return prefix(['transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function'], {
|
---|
97 | mistakes: ['-khtml-', '-ms-'],
|
---|
98 | browsers: browsers,
|
---|
99 | feature: 'css-transitions'
|
---|
100 | });
|
---|
101 | }); // Transform 2D
|
---|
102 |
|
---|
103 | f(require('caniuse-lite/data/features/transforms2d'), function (browsers) {
|
---|
104 | return prefix(['transform', 'transform-origin'], {
|
---|
105 | feature: 'transforms2d',
|
---|
106 | browsers: browsers
|
---|
107 | });
|
---|
108 | }); // Transform 3D
|
---|
109 |
|
---|
110 | var transforms3d = require('caniuse-lite/data/features/transforms3d');
|
---|
111 |
|
---|
112 | f(transforms3d, function (browsers) {
|
---|
113 | prefix(['perspective', 'perspective-origin'], {
|
---|
114 | feature: 'transforms3d',
|
---|
115 | browsers: browsers
|
---|
116 | });
|
---|
117 | return prefix(['transform-style'], {
|
---|
118 | mistakes: ['-ms-', '-o-'],
|
---|
119 | browsers: browsers,
|
---|
120 | feature: 'transforms3d'
|
---|
121 | });
|
---|
122 | });
|
---|
123 | f(transforms3d, {
|
---|
124 | match: /y\sx|y\s#2/
|
---|
125 | }, function (browsers) {
|
---|
126 | return prefix(['backface-visibility'], {
|
---|
127 | mistakes: ['-ms-', '-o-'],
|
---|
128 | feature: 'transforms3d',
|
---|
129 | browsers: browsers
|
---|
130 | });
|
---|
131 | }); // Gradients
|
---|
132 |
|
---|
133 | var gradients = require('caniuse-lite/data/features/css-gradients');
|
---|
134 |
|
---|
135 | f(gradients, {
|
---|
136 | match: /y\sx/
|
---|
137 | }, function (browsers) {
|
---|
138 | return prefix(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
|
---|
139 | props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
---|
140 | mistakes: ['-ms-'],
|
---|
141 | feature: 'css-gradients',
|
---|
142 | browsers: browsers
|
---|
143 | });
|
---|
144 | });
|
---|
145 | f(gradients, {
|
---|
146 | match: /a\sx/
|
---|
147 | }, function (browsers) {
|
---|
148 | browsers = browsers.map(function (i) {
|
---|
149 | if (/firefox|op/.test(i)) {
|
---|
150 | return i;
|
---|
151 | } else {
|
---|
152 | return i + " old";
|
---|
153 | }
|
---|
154 | });
|
---|
155 | return add(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
|
---|
156 | feature: 'css-gradients',
|
---|
157 | browsers: browsers
|
---|
158 | });
|
---|
159 | }); // Box sizing
|
---|
160 |
|
---|
161 | f(require('caniuse-lite/data/features/css3-boxsizing'), function (browsers) {
|
---|
162 | return prefix(['box-sizing'], {
|
---|
163 | feature: 'css3-boxsizing',
|
---|
164 | browsers: browsers
|
---|
165 | });
|
---|
166 | }); // Filter Effects
|
---|
167 |
|
---|
168 | f(require('caniuse-lite/data/features/css-filters'), function (browsers) {
|
---|
169 | return prefix(['filter'], {
|
---|
170 | feature: 'css-filters',
|
---|
171 | browsers: browsers
|
---|
172 | });
|
---|
173 | }); // filter() function
|
---|
174 |
|
---|
175 | f(require('caniuse-lite/data/features/css-filter-function'), function (browsers) {
|
---|
176 | return prefix(['filter-function'], {
|
---|
177 | props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
---|
178 | feature: 'css-filter-function',
|
---|
179 | browsers: browsers
|
---|
180 | });
|
---|
181 | }); // Backdrop-filter
|
---|
182 |
|
---|
183 | var backdrop = require('caniuse-lite/data/features/css-backdrop-filter');
|
---|
184 |
|
---|
185 | f(backdrop, {
|
---|
186 | match: /y\sx|y\s#2/
|
---|
187 | }, function (browsers) {
|
---|
188 | return prefix(['backdrop-filter'], {
|
---|
189 | feature: 'css-backdrop-filter',
|
---|
190 | browsers: browsers
|
---|
191 | });
|
---|
192 | }); // element() function
|
---|
193 |
|
---|
194 | f(require('caniuse-lite/data/features/css-element-function'), function (browsers) {
|
---|
195 | return prefix(['element'], {
|
---|
196 | props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
---|
197 | feature: 'css-element-function',
|
---|
198 | browsers: browsers
|
---|
199 | });
|
---|
200 | }); // Multicolumns
|
---|
201 |
|
---|
202 | f(require('caniuse-lite/data/features/multicolumn'), function (browsers) {
|
---|
203 | prefix(['columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-count', 'column-rule-style', 'column-span', 'column-fill'], {
|
---|
204 | feature: 'multicolumn',
|
---|
205 | browsers: browsers
|
---|
206 | });
|
---|
207 | var noff = browsers.filter(function (i) {
|
---|
208 | return !/firefox/.test(i);
|
---|
209 | });
|
---|
210 | prefix(['break-before', 'break-after', 'break-inside'], {
|
---|
211 | feature: 'multicolumn',
|
---|
212 | browsers: noff
|
---|
213 | });
|
---|
214 | }); // User select
|
---|
215 |
|
---|
216 | f(require('caniuse-lite/data/features/user-select-none'), function (browsers) {
|
---|
217 | return prefix(['user-select'], {
|
---|
218 | mistakes: ['-khtml-'],
|
---|
219 | feature: 'user-select-none',
|
---|
220 | browsers: browsers
|
---|
221 | });
|
---|
222 | }); // Flexible Box Layout
|
---|
223 |
|
---|
224 | var flexbox = require('caniuse-lite/data/features/flexbox');
|
---|
225 |
|
---|
226 | f(flexbox, {
|
---|
227 | match: /a\sx/
|
---|
228 | }, function (browsers) {
|
---|
229 | browsers = browsers.map(function (i) {
|
---|
230 | if (/ie|firefox/.test(i)) {
|
---|
231 | return i;
|
---|
232 | } else {
|
---|
233 | return i + " 2009";
|
---|
234 | }
|
---|
235 | });
|
---|
236 | prefix(['display-flex', 'inline-flex'], {
|
---|
237 | props: ['display'],
|
---|
238 | feature: 'flexbox',
|
---|
239 | browsers: browsers
|
---|
240 | });
|
---|
241 | prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
---|
242 | feature: 'flexbox',
|
---|
243 | browsers: browsers
|
---|
244 | });
|
---|
245 | prefix(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
---|
246 | feature: 'flexbox',
|
---|
247 | browsers: browsers
|
---|
248 | });
|
---|
249 | });
|
---|
250 | f(flexbox, {
|
---|
251 | match: /y\sx/
|
---|
252 | }, function (browsers) {
|
---|
253 | add(['display-flex', 'inline-flex'], {
|
---|
254 | feature: 'flexbox',
|
---|
255 | browsers: browsers
|
---|
256 | });
|
---|
257 | add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
---|
258 | feature: 'flexbox',
|
---|
259 | browsers: browsers
|
---|
260 | });
|
---|
261 | add(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
---|
262 | feature: 'flexbox',
|
---|
263 | browsers: browsers
|
---|
264 | });
|
---|
265 | }); // calc() unit
|
---|
266 |
|
---|
267 | f(require('caniuse-lite/data/features/calc'), function (browsers) {
|
---|
268 | return prefix(['calc'], {
|
---|
269 | props: ['*'],
|
---|
270 | feature: 'calc',
|
---|
271 | browsers: browsers
|
---|
272 | });
|
---|
273 | }); // Background options
|
---|
274 |
|
---|
275 | f(require('caniuse-lite/data/features/background-img-opts'), function (browsers) {
|
---|
276 | return prefix(['background-origin', 'background-size'], {
|
---|
277 | feature: 'background-img-opts',
|
---|
278 | browsers: browsers
|
---|
279 | });
|
---|
280 | }); // background-clip: text
|
---|
281 |
|
---|
282 | f(require('caniuse-lite/data/features/background-clip-text'), function (browsers) {
|
---|
283 | return prefix(['background-clip'], {
|
---|
284 | feature: 'background-clip-text',
|
---|
285 | browsers: browsers
|
---|
286 | });
|
---|
287 | }); // Font feature settings
|
---|
288 |
|
---|
289 | f(require('caniuse-lite/data/features/font-feature'), function (browsers) {
|
---|
290 | return prefix(['font-feature-settings', 'font-variant-ligatures', 'font-language-override'], {
|
---|
291 | feature: 'font-feature',
|
---|
292 | browsers: browsers
|
---|
293 | });
|
---|
294 | }); // CSS font-kerning property
|
---|
295 |
|
---|
296 | f(require('caniuse-lite/data/features/font-kerning'), function (browsers) {
|
---|
297 | return prefix(['font-kerning'], {
|
---|
298 | feature: 'font-kerning',
|
---|
299 | browsers: browsers
|
---|
300 | });
|
---|
301 | }); // Border image
|
---|
302 |
|
---|
303 | f(require('caniuse-lite/data/features/border-image'), function (browsers) {
|
---|
304 | return prefix(['border-image'], {
|
---|
305 | feature: 'border-image',
|
---|
306 | browsers: browsers
|
---|
307 | });
|
---|
308 | }); // Selection selector
|
---|
309 |
|
---|
310 | f(require('caniuse-lite/data/features/css-selection'), function (browsers) {
|
---|
311 | return prefix(['::selection'], {
|
---|
312 | selector: true,
|
---|
313 | feature: 'css-selection',
|
---|
314 | browsers: browsers
|
---|
315 | });
|
---|
316 | }); // Placeholder selector
|
---|
317 |
|
---|
318 | f(require('caniuse-lite/data/features/css-placeholder'), function (browsers) {
|
---|
319 | prefix(['::placeholder'], {
|
---|
320 | selector: true,
|
---|
321 | feature: 'css-placeholder',
|
---|
322 | browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old'])
|
---|
323 | });
|
---|
324 | }); // Placeholder-shown selector
|
---|
325 |
|
---|
326 | f(require('caniuse-lite/data/features/css-placeholder-shown'), function (browsers) {
|
---|
327 | prefix([':placeholder-shown'], {
|
---|
328 | selector: true,
|
---|
329 | feature: 'css-placeholder-shown',
|
---|
330 | browsers: browsers
|
---|
331 | });
|
---|
332 | }); // Hyphenation
|
---|
333 |
|
---|
334 | f(require('caniuse-lite/data/features/css-hyphens'), function (browsers) {
|
---|
335 | return prefix(['hyphens'], {
|
---|
336 | feature: 'css-hyphens',
|
---|
337 | browsers: browsers
|
---|
338 | });
|
---|
339 | }); // Fullscreen selector
|
---|
340 |
|
---|
341 | var fullscreen = require('caniuse-lite/data/features/fullscreen');
|
---|
342 |
|
---|
343 | f(fullscreen, function (browsers) {
|
---|
344 | return prefix([':fullscreen'], {
|
---|
345 | selector: true,
|
---|
346 | feature: 'fullscreen',
|
---|
347 | browsers: browsers
|
---|
348 | });
|
---|
349 | });
|
---|
350 | f(fullscreen, {
|
---|
351 | match: /x(\s#2|$)/
|
---|
352 | }, function (browsers) {
|
---|
353 | return prefix(['::backdrop'], {
|
---|
354 | selector: true,
|
---|
355 | feature: 'fullscreen',
|
---|
356 | browsers: browsers
|
---|
357 | });
|
---|
358 | }); // Tab size
|
---|
359 |
|
---|
360 | f(require('caniuse-lite/data/features/css3-tabsize'), function (browsers) {
|
---|
361 | return prefix(['tab-size'], {
|
---|
362 | feature: 'css3-tabsize',
|
---|
363 | browsers: browsers
|
---|
364 | });
|
---|
365 | }); // Intrinsic & extrinsic sizing
|
---|
366 |
|
---|
367 | var intrinsic = require('caniuse-lite/data/features/intrinsic-width');
|
---|
368 |
|
---|
369 | var sizeProps = ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'];
|
---|
370 | f(intrinsic, function (browsers) {
|
---|
371 | return prefix(['max-content', 'min-content'], {
|
---|
372 | props: sizeProps,
|
---|
373 | feature: 'intrinsic-width',
|
---|
374 | browsers: browsers
|
---|
375 | });
|
---|
376 | });
|
---|
377 | f(intrinsic, {
|
---|
378 | match: /x|\s#4/
|
---|
379 | }, function (browsers) {
|
---|
380 | return prefix(['fill', 'fill-available', 'stretch'], {
|
---|
381 | props: sizeProps,
|
---|
382 | feature: 'intrinsic-width',
|
---|
383 | browsers: browsers
|
---|
384 | });
|
---|
385 | });
|
---|
386 | f(intrinsic, {
|
---|
387 | match: /x|\s#5/
|
---|
388 | }, function (browsers) {
|
---|
389 | return prefix(['fit-content'], {
|
---|
390 | props: sizeProps,
|
---|
391 | feature: 'intrinsic-width',
|
---|
392 | browsers: browsers
|
---|
393 | });
|
---|
394 | }); // Zoom cursors
|
---|
395 |
|
---|
396 | f(require('caniuse-lite/data/features/css3-cursors-newer'), function (browsers) {
|
---|
397 | return prefix(['zoom-in', 'zoom-out'], {
|
---|
398 | props: ['cursor'],
|
---|
399 | feature: 'css3-cursors-newer',
|
---|
400 | browsers: browsers
|
---|
401 | });
|
---|
402 | }); // Grab cursors
|
---|
403 |
|
---|
404 | f(require('caniuse-lite/data/features/css3-cursors-grab'), function (browsers) {
|
---|
405 | return prefix(['grab', 'grabbing'], {
|
---|
406 | props: ['cursor'],
|
---|
407 | feature: 'css3-cursors-grab',
|
---|
408 | browsers: browsers
|
---|
409 | });
|
---|
410 | }); // Sticky position
|
---|
411 |
|
---|
412 | f(require('caniuse-lite/data/features/css-sticky'), function (browsers) {
|
---|
413 | return prefix(['sticky'], {
|
---|
414 | props: ['position'],
|
---|
415 | feature: 'css-sticky',
|
---|
416 | browsers: browsers
|
---|
417 | });
|
---|
418 | }); // Pointer Events
|
---|
419 |
|
---|
420 | f(require('caniuse-lite/data/features/pointer'), function (browsers) {
|
---|
421 | return prefix(['touch-action'], {
|
---|
422 | feature: 'pointer',
|
---|
423 | browsers: browsers
|
---|
424 | });
|
---|
425 | }); // Text decoration
|
---|
426 |
|
---|
427 | var decoration = require('caniuse-lite/data/features/text-decoration');
|
---|
428 |
|
---|
429 | f(decoration, function (browsers) {
|
---|
430 | return prefix(['text-decoration-style', 'text-decoration-color', 'text-decoration-line', 'text-decoration'], {
|
---|
431 | feature: 'text-decoration',
|
---|
432 | browsers: browsers
|
---|
433 | });
|
---|
434 | });
|
---|
435 | f(decoration, {
|
---|
436 | match: /x.*#[235]/
|
---|
437 | }, function (browsers) {
|
---|
438 | return prefix(['text-decoration-skip', 'text-decoration-skip-ink'], {
|
---|
439 | feature: 'text-decoration',
|
---|
440 | browsers: browsers
|
---|
441 | });
|
---|
442 | }); // Text Size Adjust
|
---|
443 |
|
---|
444 | f(require('caniuse-lite/data/features/text-size-adjust'), function (browsers) {
|
---|
445 | return prefix(['text-size-adjust'], {
|
---|
446 | feature: 'text-size-adjust',
|
---|
447 | browsers: browsers
|
---|
448 | });
|
---|
449 | }); // CSS Masks
|
---|
450 |
|
---|
451 | f(require('caniuse-lite/data/features/css-masks'), function (browsers) {
|
---|
452 | prefix(['mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source'], {
|
---|
453 | feature: 'css-masks',
|
---|
454 | browsers: browsers
|
---|
455 | });
|
---|
456 | prefix(['mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice'], {
|
---|
457 | feature: 'css-masks',
|
---|
458 | browsers: browsers
|
---|
459 | });
|
---|
460 | }); // CSS clip-path property
|
---|
461 |
|
---|
462 | f(require('caniuse-lite/data/features/css-clip-path'), function (browsers) {
|
---|
463 | return prefix(['clip-path'], {
|
---|
464 | feature: 'css-clip-path',
|
---|
465 | browsers: browsers
|
---|
466 | });
|
---|
467 | }); // Fragmented Borders and Backgrounds
|
---|
468 |
|
---|
469 | f(require('caniuse-lite/data/features/css-boxdecorationbreak'), function (browsers) {
|
---|
470 | return prefix(['box-decoration-break'], {
|
---|
471 | feature: 'css-boxdecorationbreak',
|
---|
472 | browsers: browsers
|
---|
473 | });
|
---|
474 | }); // CSS3 object-fit/object-position
|
---|
475 |
|
---|
476 | f(require('caniuse-lite/data/features/object-fit'), function (browsers) {
|
---|
477 | return prefix(['object-fit', 'object-position'], {
|
---|
478 | feature: 'object-fit',
|
---|
479 | browsers: browsers
|
---|
480 | });
|
---|
481 | }); // CSS Shapes
|
---|
482 |
|
---|
483 | f(require('caniuse-lite/data/features/css-shapes'), function (browsers) {
|
---|
484 | return prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], {
|
---|
485 | feature: 'css-shapes',
|
---|
486 | browsers: browsers
|
---|
487 | });
|
---|
488 | }); // CSS3 text-overflow
|
---|
489 |
|
---|
490 | f(require('caniuse-lite/data/features/text-overflow'), function (browsers) {
|
---|
491 | return prefix(['text-overflow'], {
|
---|
492 | feature: 'text-overflow',
|
---|
493 | browsers: browsers
|
---|
494 | });
|
---|
495 | }); // Viewport at-rule
|
---|
496 |
|
---|
497 | f(require('caniuse-lite/data/features/css-deviceadaptation'), function (browsers) {
|
---|
498 | return prefix(['@viewport'], {
|
---|
499 | feature: 'css-deviceadaptation',
|
---|
500 | browsers: browsers
|
---|
501 | });
|
---|
502 | }); // Resolution Media Queries
|
---|
503 |
|
---|
504 | var resolut = require('caniuse-lite/data/features/css-media-resolution');
|
---|
505 |
|
---|
506 | f(resolut, {
|
---|
507 | match: /( x($| )|a #2)/
|
---|
508 | }, function (browsers) {
|
---|
509 | return prefix(['@resolution'], {
|
---|
510 | feature: 'css-media-resolution',
|
---|
511 | browsers: browsers
|
---|
512 | });
|
---|
513 | }); // CSS text-align-last
|
---|
514 |
|
---|
515 | f(require('caniuse-lite/data/features/css-text-align-last'), function (browsers) {
|
---|
516 | return prefix(['text-align-last'], {
|
---|
517 | feature: 'css-text-align-last',
|
---|
518 | browsers: browsers
|
---|
519 | });
|
---|
520 | }); // Crisp Edges Image Rendering Algorithm
|
---|
521 |
|
---|
522 | var crispedges = require('caniuse-lite/data/features/css-crisp-edges');
|
---|
523 |
|
---|
524 | f(crispedges, {
|
---|
525 | match: /y x|a x #1/
|
---|
526 | }, function (browsers) {
|
---|
527 | return prefix(['pixelated'], {
|
---|
528 | props: ['image-rendering'],
|
---|
529 | feature: 'css-crisp-edges',
|
---|
530 | browsers: browsers
|
---|
531 | });
|
---|
532 | });
|
---|
533 | f(crispedges, {
|
---|
534 | match: /a x #2/
|
---|
535 | }, function (browsers) {
|
---|
536 | return prefix(['image-rendering'], {
|
---|
537 | feature: 'css-crisp-edges',
|
---|
538 | browsers: browsers
|
---|
539 | });
|
---|
540 | }); // Logical Properties
|
---|
541 |
|
---|
542 | var logicalProps = require('caniuse-lite/data/features/css-logical-props');
|
---|
543 |
|
---|
544 | f(logicalProps, function (browsers) {
|
---|
545 | return prefix(['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end'], {
|
---|
546 | feature: 'css-logical-props',
|
---|
547 | browsers: browsers
|
---|
548 | });
|
---|
549 | });
|
---|
550 | f(logicalProps, {
|
---|
551 | match: /x\s#2/
|
---|
552 | }, function (browsers) {
|
---|
553 | return prefix(['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end'], {
|
---|
554 | feature: 'css-logical-props',
|
---|
555 | browsers: browsers
|
---|
556 | });
|
---|
557 | }); // CSS appearance
|
---|
558 |
|
---|
559 | var appearance = require('caniuse-lite/data/features/css-appearance');
|
---|
560 |
|
---|
561 | f(appearance, {
|
---|
562 | match: /#2|x/
|
---|
563 | }, function (browsers) {
|
---|
564 | return prefix(['appearance'], {
|
---|
565 | feature: 'css-appearance',
|
---|
566 | browsers: browsers
|
---|
567 | });
|
---|
568 | }); // CSS Scroll snap points
|
---|
569 |
|
---|
570 | f(require('caniuse-lite/data/features/css-snappoints'), function (browsers) {
|
---|
571 | return prefix(['scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y'], {
|
---|
572 | feature: 'css-snappoints',
|
---|
573 | browsers: browsers
|
---|
574 | });
|
---|
575 | }); // CSS Regions
|
---|
576 |
|
---|
577 | f(require('caniuse-lite/data/features/css-regions'), function (browsers) {
|
---|
578 | return prefix(['flow-into', 'flow-from', 'region-fragment'], {
|
---|
579 | feature: 'css-regions',
|
---|
580 | browsers: browsers
|
---|
581 | });
|
---|
582 | }); // CSS image-set
|
---|
583 |
|
---|
584 | f(require('caniuse-lite/data/features/css-image-set'), function (browsers) {
|
---|
585 | return prefix(['image-set'], {
|
---|
586 | props: ['background', 'background-image', 'border-image', 'cursor', 'mask', 'mask-image', 'list-style', 'list-style-image', 'content'],
|
---|
587 | feature: 'css-image-set',
|
---|
588 | browsers: browsers
|
---|
589 | });
|
---|
590 | }); // Writing Mode
|
---|
591 |
|
---|
592 | var writingMode = require('caniuse-lite/data/features/css-writing-mode');
|
---|
593 |
|
---|
594 | f(writingMode, {
|
---|
595 | match: /a|x/
|
---|
596 | }, function (browsers) {
|
---|
597 | return prefix(['writing-mode'], {
|
---|
598 | feature: 'css-writing-mode',
|
---|
599 | browsers: browsers
|
---|
600 | });
|
---|
601 | }); // Cross-Fade Function
|
---|
602 |
|
---|
603 | f(require('caniuse-lite/data/features/css-cross-fade'), function (browsers) {
|
---|
604 | return prefix(['cross-fade'], {
|
---|
605 | props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
---|
606 | feature: 'css-cross-fade',
|
---|
607 | browsers: browsers
|
---|
608 | });
|
---|
609 | }); // Read Only selector
|
---|
610 |
|
---|
611 | f(require('caniuse-lite/data/features/css-read-only-write'), function (browsers) {
|
---|
612 | return prefix([':read-only', ':read-write'], {
|
---|
613 | selector: true,
|
---|
614 | feature: 'css-read-only-write',
|
---|
615 | browsers: browsers
|
---|
616 | });
|
---|
617 | }); // Text Emphasize
|
---|
618 |
|
---|
619 | f(require('caniuse-lite/data/features/text-emphasis'), function (browsers) {
|
---|
620 | return prefix(['text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color'], {
|
---|
621 | feature: 'text-emphasis',
|
---|
622 | browsers: browsers
|
---|
623 | });
|
---|
624 | }); // CSS Grid Layout
|
---|
625 |
|
---|
626 | var grid = require('caniuse-lite/data/features/css-grid');
|
---|
627 |
|
---|
628 | f(grid, function (browsers) {
|
---|
629 | prefix(['display-grid', 'inline-grid'], {
|
---|
630 | props: ['display'],
|
---|
631 | feature: 'css-grid',
|
---|
632 | browsers: browsers
|
---|
633 | });
|
---|
634 | prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas', 'place-self'], {
|
---|
635 | feature: 'css-grid',
|
---|
636 | browsers: browsers
|
---|
637 | });
|
---|
638 | });
|
---|
639 | f(grid, {
|
---|
640 | match: /a x/
|
---|
641 | }, function (browsers) {
|
---|
642 | return prefix(['grid-column-align', 'grid-row-align'], {
|
---|
643 | feature: 'css-grid',
|
---|
644 | browsers: browsers
|
---|
645 | });
|
---|
646 | }); // CSS text-spacing
|
---|
647 |
|
---|
648 | f(require('caniuse-lite/data/features/css-text-spacing'), function (browsers) {
|
---|
649 | return prefix(['text-spacing'], {
|
---|
650 | feature: 'css-text-spacing',
|
---|
651 | browsers: browsers
|
---|
652 | });
|
---|
653 | }); // :any-link selector
|
---|
654 |
|
---|
655 | f(require('caniuse-lite/data/features/css-any-link'), function (browsers) {
|
---|
656 | return prefix([':any-link'], {
|
---|
657 | selector: true,
|
---|
658 | feature: 'css-any-link',
|
---|
659 | browsers: browsers
|
---|
660 | });
|
---|
661 | }); // unicode-bidi
|
---|
662 |
|
---|
663 | var bidi = require('caniuse-lite/data/features/css-unicode-bidi');
|
---|
664 |
|
---|
665 | f(bidi, function (browsers) {
|
---|
666 | return prefix(['isolate'], {
|
---|
667 | props: ['unicode-bidi'],
|
---|
668 | feature: 'css-unicode-bidi',
|
---|
669 | browsers: browsers
|
---|
670 | });
|
---|
671 | });
|
---|
672 | f(bidi, {
|
---|
673 | match: /y x|a x #2/
|
---|
674 | }, function (browsers) {
|
---|
675 | return prefix(['plaintext'], {
|
---|
676 | props: ['unicode-bidi'],
|
---|
677 | feature: 'css-unicode-bidi',
|
---|
678 | browsers: browsers
|
---|
679 | });
|
---|
680 | });
|
---|
681 | f(bidi, {
|
---|
682 | match: /y x/
|
---|
683 | }, function (browsers) {
|
---|
684 | return prefix(['isolate-override'], {
|
---|
685 | props: ['unicode-bidi'],
|
---|
686 | feature: 'css-unicode-bidi',
|
---|
687 | browsers: browsers
|
---|
688 | });
|
---|
689 | }); // overscroll-behavior selector
|
---|
690 |
|
---|
691 | var over = require('caniuse-lite/data/features/css-overscroll-behavior');
|
---|
692 |
|
---|
693 | f(over, {
|
---|
694 | match: /a #1/
|
---|
695 | }, function (browsers) {
|
---|
696 | return prefix(['overscroll-behavior'], {
|
---|
697 | feature: 'css-overscroll-behavior',
|
---|
698 | browsers: browsers
|
---|
699 | });
|
---|
700 | }); // color-adjust
|
---|
701 |
|
---|
702 | f(require('caniuse-lite/data/features/css-color-adjust'), function (browsers) {
|
---|
703 | return prefix(['color-adjust'], {
|
---|
704 | feature: 'css-color-adjust',
|
---|
705 | browsers: browsers
|
---|
706 | });
|
---|
707 | }); // text-orientation
|
---|
708 |
|
---|
709 | f(require('caniuse-lite/data/features/css-text-orientation'), function (browsers) {
|
---|
710 | return prefix(['text-orientation'], {
|
---|
711 | feature: 'css-text-orientation',
|
---|
712 | browsers: browsers
|
---|
713 | });
|
---|
714 | }); |
---|