prefixes.js 22 KB

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