prefixes.js 21 KB

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