| 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 |
browsers, |
| 72 |
feature: 'border-radius', |
| 73 |
mistakes: ['-khtml-', '-ms-', '-o-'] |
| 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 |
browsers, |
| 84 |
feature: 'css-boxshadow', |
| 85 |
mistakes: ['-khtml-'] |
| 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 |
browsers, |
| 108 |
feature: 'css-animation', |
| 109 |
mistakes: ['-khtml-', '-ms-'] |
| 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 |
browsers, |
| 128 |
feature: 'css-transitions', |
| 129 |
mistakes: ['-khtml-', '-ms-'] |
| 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 |
browsers, |
| 140 |
feature: 'transforms2d' |
| 141 |
}) |
| 142 |
) |
| 143 |
|
| 144 |
|
| 145 |
let prefixTransforms3d = require('caniuse-lite/data/features/transforms3d') |
| 146 |
|
| 147 |
f(prefixTransforms3d, browsers => { |
| 148 |
prefix(['perspective', 'perspective-origin'], { |
| 149 |
browsers, |
| 150 |
feature: 'transforms3d' |
| 151 |
}) |
| 152 |
return prefix(['transform-style'], { |
| 153 |
browsers, |
| 154 |
feature: 'transforms3d', |
| 155 |
mistakes: ['-ms-', '-o-'] |
| 156 |
}) |
| 157 |
}) |
| 158 |
|
| 159 |
f(prefixTransforms3d, { match: /y\sx|y\s#2/ }, browsers => |
| 160 |
prefix(['backface-visibility'], { |
| 161 |
browsers, |
| 162 |
feature: 'transforms3d', |
| 163 |
mistakes: ['-ms-', '-o-'] |
| 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 |
browsers, |
| 180 |
feature: 'css-gradients', |
| 181 |
mistakes: ['-ms-'], |
| 182 |
props: [ |
| 183 |
'background', |
| 184 |
'background-image', |
| 185 |
'border-image', |
| 186 |
'mask', |
| 187 |
'list-style', |
| 188 |
'list-style-image', |
| 189 |
'content', |
| 190 |
'mask-image' |
| 191 |
] |
| 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 |
browsers, |
| 213 |
feature: 'css-gradients' |
| 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 |
browsers, |
| 224 |
feature: 'css3-boxsizing' |
| 225 |
}) |
| 226 |
) |
| 227 |
|
| 228 |
|
| 229 |
let prefixFilters = require('caniuse-lite/data/features/css-filters') |
| 230 |
|
| 231 |
f(prefixFilters, browsers => |
| 232 |
prefix(['filter'], { |
| 233 |
browsers, |
| 234 |
feature: 'css-filters' |
| 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 |
browsers, |
| 244 |
feature: 'css-filter-function', |
| 245 |
props: [ |
| 246 |
'background', |
| 247 |
'background-image', |
| 248 |
'border-image', |
| 249 |
'mask', |
| 250 |
'list-style', |
| 251 |
'list-style-image', |
| 252 |
'content', |
| 253 |
'mask-image' |
| 254 |
] |
| 255 |
}) |
| 256 |
) |
| 257 |
|
| 258 |
|
| 259 |
let prefixBackdropFilter = require('caniuse-lite/data/features/css-backdrop-filter') |
| 260 |
|
| 261 |
f(prefixBackdropFilter, { match: /y\sx|y\s#2/ }, browsers => |
| 262 |
prefix(['backdrop-filter'], { |
| 263 |
browsers, |
| 264 |
feature: 'css-backdrop-filter' |
| 265 |
}) |
| 266 |
) |
| 267 |
|
| 268 |
|
| 269 |
let prefixElementFunction = require('caniuse-lite/data/features/css-element-function') |
| 270 |
|
| 271 |
f(prefixElementFunction, browsers => |
| 272 |
prefix(['element'], { |
| 273 |
browsers, |
| 274 |
feature: 'css-element-function', |
| 275 |
props: [ |
| 276 |
'background', |
| 277 |
'background-image', |
| 278 |
'border-image', |
| 279 |
'mask', |
| 280 |
'list-style', |
| 281 |
'list-style-image', |
| 282 |
'content', |
| 283 |
'mask-image' |
| 284 |
] |
| 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 |
browsers, |
| 307 |
feature: 'multicolumn' |
| 308 |
} |
| 309 |
) |
| 310 |
|
| 311 |
let noff = browsers.filter(i => !/firefox/.test(i)) |
| 312 |
prefix(['break-before', 'break-after', 'break-inside'], { |
| 313 |
browsers: noff, |
| 314 |
feature: 'multicolumn' |
| 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 |
browsers, |
| 324 |
feature: 'user-select-none', |
| 325 |
mistakes: ['-khtml-'] |
| 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 |
browsers, |
| 342 |
feature: 'flexbox', |
| 343 |
props: ['display'] |
| 344 |
}) |
| 345 |
prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], { |
| 346 |
browsers, |
| 347 |
feature: 'flexbox' |
| 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 |
browsers, |
| 362 |
feature: 'flexbox' |
| 363 |
} |
| 364 |
) |
| 365 |
}) |
| 366 |
|
| 367 |
f(prefixFlexbox, { match: /y\sx/ }, browsers => { |
| 368 |
add(['display-flex', 'inline-flex'], { |
| 369 |
browsers, |
| 370 |
feature: 'flexbox' |
| 371 |
}) |
| 372 |
add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], { |
| 373 |
browsers, |
| 374 |
feature: 'flexbox' |
| 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 |
browsers, |
| 389 |
feature: 'flexbox' |
| 390 |
} |
| 391 |
) |
| 392 |
}) |
| 393 |
|
| 394 |
|
| 395 |
let prefixCalc = require('caniuse-lite/data/features/calc') |
| 396 |
|
| 397 |
f(prefixCalc, browsers => |
| 398 |
prefix(['calc'], { |
| 399 |
browsers, |
| 400 |
feature: 'calc', |
| 401 |
props: ['*'] |
| 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 |
browsers, |
| 411 |
feature: 'background-img-opts' |
| 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 |
browsers, |
| 421 |
feature: 'background-clip-text' |
| 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 |
browsers, |
| 437 |
feature: 'font-feature' |
| 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 |
browsers, |
| 448 |
feature: 'font-kerning' |
| 449 |
}) |
| 450 |
) |
| 451 |
|
| 452 |
|
| 453 |
let prefixBorderImage = require('caniuse-lite/data/features/border-image') |
| 454 |
|
| 455 |
f(prefixBorderImage, browsers => |
| 456 |
prefix(['border-image'], { |
| 457 |
browsers, |
| 458 |
feature: 'border-image' |
| 459 |
}) |
| 460 |
) |
| 461 |
|
| 462 |
|
| 463 |
let prefixSelection = require('caniuse-lite/data/features/css-selection') |
| 464 |
|
| 465 |
f(prefixSelection, browsers => |
| 466 |
prefix(['::selection'], { |
| 467 |
browsers, |
| 468 |
feature: 'css-selection', |
| 469 |
selector: true |
| 470 |
}) |
| 471 |
) |
| 472 |
|
| 473 |
|
| 474 |
let prefixPlaceholder = require('caniuse-lite/data/features/css-placeholder') |
| 475 |
|
| 476 |
f(prefixPlaceholder, browsers => { |
| 477 |
prefix(['::placeholder'], { |
| 478 |
browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old']), |
| 479 |
feature: 'css-placeholder', |
| 480 |
selector: true |
| 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 |
browsers, |
| 490 |
feature: 'css-placeholder-shown', |
| 491 |
selector: true |
| 492 |
}) |
| 493 |
}) |
| 494 |
|
| 495 |
|
| 496 |
let prefixHyphens = require('caniuse-lite/data/features/css-hyphens') |
| 497 |
|
| 498 |
f(prefixHyphens, browsers => |
| 499 |
prefix(['hyphens'], { |
| 500 |
browsers, |
| 501 |
feature: 'css-hyphens' |
| 502 |
}) |
| 503 |
) |
| 504 |
|
| 505 |
|
| 506 |
let prefixFullscreen = require('caniuse-lite/data/features/fullscreen') |
| 507 |
|
| 508 |
f(prefixFullscreen, browsers => |
| 509 |
prefix([':fullscreen'], { |
| 510 |
browsers, |
| 511 |
feature: 'fullscreen', |
| 512 |
selector: true |
| 513 |
}) |
| 514 |
) |
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
let prefixBackdrop = require('caniuse-lite/data/features/mdn-css-backdrop-pseudo-element') |
| 519 |
|
| 520 |
f(prefixBackdrop, browsers => |
| 521 |
prefix(['::backdrop'], { |
| 522 |
browsers, |
| 523 |
feature: 'backdrop', |
| 524 |
selector: true |
| 525 |
}) |
| 526 |
) |
| 527 |
|
| 528 |
|
| 529 |
let prefixFileSelectorButton = require('caniuse-lite/data/features/css-file-selector-button') |
| 530 |
|
| 531 |
f(prefixFileSelectorButton, browsers => |
| 532 |
prefix(['::file-selector-button'], { |
| 533 |
browsers, |
| 534 |
feature: 'file-selector-button', |
| 535 |
selector: true |
| 536 |
}) |
| 537 |
) |
| 538 |
|
| 539 |
|
| 540 |
let prefixAutofill = require('caniuse-lite/data/features/css-autofill') |
| 541 |
|
| 542 |
f(prefixAutofill, browsers => |
| 543 |
prefix([':autofill'], { |
| 544 |
browsers, |
| 545 |
feature: 'css-autofill', |
| 546 |
selector: true |
| 547 |
}) |
| 548 |
) |
| 549 |
|
| 550 |
|
| 551 |
let prefixTabsize = require('caniuse-lite/data/features/css3-tabsize') |
| 552 |
|
| 553 |
f(prefixTabsize, browsers => |
| 554 |
prefix(['tab-size'], { |
| 555 |
browsers, |
| 556 |
feature: 'css3-tabsize' |
| 557 |
}) |
| 558 |
) |
| 559 |
|
| 560 |
|
| 561 |
let prefixIntrinsic = require('caniuse-lite/data/features/intrinsic-width') |
| 562 |
|
| 563 |
let sizeProps = [ |
| 564 |
'width', |
| 565 |
'min-width', |
| 566 |
'max-width', |
| 567 |
'height', |
| 568 |
'min-height', |
| 569 |
'max-height', |
| 570 |
'inline-size', |
| 571 |
'min-inline-size', |
| 572 |
'max-inline-size', |
| 573 |
'block-size', |
| 574 |
'min-block-size', |
| 575 |
'max-block-size', |
| 576 |
'grid', |
| 577 |
'grid-template', |
| 578 |
'grid-template-rows', |
| 579 |
'grid-template-columns', |
| 580 |
'grid-auto-columns', |
| 581 |
'grid-auto-rows' |
| 582 |
] |
| 583 |
|
| 584 |
f(prefixIntrinsic, browsers => |
| 585 |
prefix(['max-content', 'min-content'], { |
| 586 |
browsers, |
| 587 |
feature: 'intrinsic-width', |
| 588 |
props: sizeProps |
| 589 |
}) |
| 590 |
) |
| 591 |
|
| 592 |
f(prefixIntrinsic, { match: /x|\s#4/ }, browsers => |
| 593 |
prefix(['fill', 'fill-available'], { |
| 594 |
browsers, |
| 595 |
feature: 'intrinsic-width', |
| 596 |
props: sizeProps |
| 597 |
}) |
| 598 |
) |
| 599 |
|
| 600 |
f(prefixIntrinsic, { match: /x|\s#5/ }, browsers => { |
| 601 |
let ffFix = browsers.filter(i => { |
| 602 |
let [name, version] = i.split(' ') |
| 603 |
if (name === 'firefox' || name === 'and_ff') { |
| 604 |
return parseInt(version) < 94 |
| 605 |
} else { |
| 606 |
return true |
| 607 |
} |
| 608 |
}) |
| 609 |
return prefix(['fit-content'], { |
| 610 |
browsers: ffFix, |
| 611 |
feature: 'intrinsic-width', |
| 612 |
props: sizeProps |
| 613 |
}) |
| 614 |
}) |
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
let prefixStretch = require('caniuse-lite/data/features/css-width-stretch') |
| 619 |
|
| 620 |
f(prefixStretch, browsers => |
| 621 |
prefix(['stretch'], { |
| 622 |
browsers, |
| 623 |
feature: 'css-width-stretch', |
| 624 |
props: sizeProps |
| 625 |
}) |
| 626 |
) |
| 627 |
|
| 628 |
|
| 629 |
let prefixCursorsNewer = require('caniuse-lite/data/features/css3-cursors-newer') |
| 630 |
|
| 631 |
f(prefixCursorsNewer, browsers => |
| 632 |
prefix(['zoom-in', 'zoom-out'], { |
| 633 |
browsers, |
| 634 |
feature: 'css3-cursors-newer', |
| 635 |
props: ['cursor'] |
| 636 |
}) |
| 637 |
) |
| 638 |
|
| 639 |
|
| 640 |
let prefixCursorsGrab = require('caniuse-lite/data/features/css3-cursors-grab') |
| 641 |
|
| 642 |
f(prefixCursorsGrab, browsers => |
| 643 |
prefix(['grab', 'grabbing'], { |
| 644 |
browsers, |
| 645 |
feature: 'css3-cursors-grab', |
| 646 |
props: ['cursor'] |
| 647 |
}) |
| 648 |
) |
| 649 |
|
| 650 |
|
| 651 |
let prefixSticky = require('caniuse-lite/data/features/css-sticky') |
| 652 |
|
| 653 |
f(prefixSticky, browsers => |
| 654 |
prefix(['sticky'], { |
| 655 |
browsers, |
| 656 |
feature: 'css-sticky', |
| 657 |
props: ['position'] |
| 658 |
}) |
| 659 |
) |
| 660 |
|
| 661 |
|
| 662 |
let prefixPointer = require('caniuse-lite/data/features/pointer') |
| 663 |
|
| 664 |
f(prefixPointer, browsers => |
| 665 |
prefix(['touch-action'], { |
| 666 |
browsers, |
| 667 |
feature: 'pointer' |
| 668 |
}) |
| 669 |
) |
| 670 |
|
| 671 |
|
| 672 |
let prefixDecoration = require('caniuse-lite/data/features/text-decoration') |
| 673 |
|
| 674 |
f(prefixDecoration, { match: /x.*#[235]/ }, browsers => |
| 675 |
prefix(['text-decoration-skip', 'text-decoration-skip-ink'], { |
| 676 |
browsers, |
| 677 |
feature: 'text-decoration' |
| 678 |
}) |
| 679 |
) |
| 680 |
|
| 681 |
let prefixDecorationShorthand = require('caniuse-lite/data/features/mdn-text-decoration-shorthand') |
| 682 |
|
| 683 |
f(prefixDecorationShorthand, browsers => |
| 684 |
prefix(['text-decoration'], { |
| 685 |
browsers, |
| 686 |
feature: 'text-decoration' |
| 687 |
}) |
| 688 |
) |
| 689 |
|
| 690 |
let prefixDecorationColor = require('caniuse-lite/data/features/mdn-text-decoration-color') |
| 691 |
|
| 692 |
f(prefixDecorationColor, browsers => |
| 693 |
prefix(['text-decoration-color'], { |
| 694 |
browsers, |
| 695 |
feature: 'text-decoration' |
| 696 |
}) |
| 697 |
) |
| 698 |
|
| 699 |
let prefixDecorationLine = require('caniuse-lite/data/features/mdn-text-decoration-line') |
| 700 |
|
| 701 |
f(prefixDecorationLine, browsers => |
| 702 |
prefix(['text-decoration-line'], { |
| 703 |
browsers, |
| 704 |
feature: 'text-decoration' |
| 705 |
}) |
| 706 |
) |
| 707 |
|
| 708 |
let prefixDecorationStyle = require('caniuse-lite/data/features/mdn-text-decoration-style') |
| 709 |
|
| 710 |
f(prefixDecorationStyle, browsers => |
| 711 |
prefix(['text-decoration-style'], { |
| 712 |
browsers, |
| 713 |
feature: 'text-decoration' |
| 714 |
}) |
| 715 |
) |
| 716 |
|
| 717 |
|
| 718 |
let prefixTextSizeAdjust = require('caniuse-lite/data/features/text-size-adjust') |
| 719 |
|
| 720 |
f(prefixTextSizeAdjust, browsers => |
| 721 |
prefix(['text-size-adjust'], { |
| 722 |
browsers, |
| 723 |
feature: 'text-size-adjust' |
| 724 |
}) |
| 725 |
) |
| 726 |
|
| 727 |
|
| 728 |
let prefixCssMasks = require('caniuse-lite/data/features/css-masks') |
| 729 |
|
| 730 |
f(prefixCssMasks, browsers => { |
| 731 |
prefix( |
| 732 |
[ |
| 733 |
'mask-clip', |
| 734 |
'mask-composite', |
| 735 |
'mask-image', |
| 736 |
'mask-origin', |
| 737 |
'mask-repeat', |
| 738 |
'mask-border-repeat', |
| 739 |
'mask-border-source' |
| 740 |
], |
| 741 |
{ |
| 742 |
browsers, |
| 743 |
feature: 'css-masks' |
| 744 |
} |
| 745 |
) |
| 746 |
prefix( |
| 747 |
[ |
| 748 |
'mask', |
| 749 |
'mask-position', |
| 750 |
'mask-size', |
| 751 |
'mask-border', |
| 752 |
'mask-border-outset', |
| 753 |
'mask-border-width', |
| 754 |
'mask-border-slice' |
| 755 |
], |
| 756 |
{ |
| 757 |
browsers, |
| 758 |
feature: 'css-masks' |
| 759 |
} |
| 760 |
) |
| 761 |
}) |
| 762 |
|
| 763 |
|
| 764 |
let prefixClipPath = require('caniuse-lite/data/features/css-clip-path') |
| 765 |
|
| 766 |
f(prefixClipPath, browsers => |
| 767 |
prefix(['clip-path'], { |
| 768 |
browsers, |
| 769 |
feature: 'css-clip-path' |
| 770 |
}) |
| 771 |
) |
| 772 |
|
| 773 |
|
| 774 |
let prefixBoxdecoration = require('caniuse-lite/data/features/css-boxdecorationbreak') |
| 775 |
|
| 776 |
f(prefixBoxdecoration, browsers => |
| 777 |
prefix(['box-decoration-break'], { |
| 778 |
browsers, |
| 779 |
feature: 'css-boxdecorationbreak' |
| 780 |
}) |
| 781 |
) |
| 782 |
|
| 783 |
|
| 784 |
let prefixObjectFit = require('caniuse-lite/data/features/object-fit') |
| 785 |
|
| 786 |
f(prefixObjectFit, browsers => |
| 787 |
prefix(['object-fit', 'object-position'], { |
| 788 |
browsers, |
| 789 |
feature: 'object-fit' |
| 790 |
}) |
| 791 |
) |
| 792 |
|
| 793 |
|
| 794 |
let prefixShapes = require('caniuse-lite/data/features/css-shapes') |
| 795 |
|
| 796 |
f(prefixShapes, browsers => |
| 797 |
prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], { |
| 798 |
browsers, |
| 799 |
feature: 'css-shapes' |
| 800 |
}) |
| 801 |
) |
| 802 |
|
| 803 |
|
| 804 |
let prefixTextOverflow = require('caniuse-lite/data/features/text-overflow') |
| 805 |
|
| 806 |
f(prefixTextOverflow, browsers => |
| 807 |
prefix(['text-overflow'], { |
| 808 |
browsers, |
| 809 |
feature: 'text-overflow' |
| 810 |
}) |
| 811 |
) |
| 812 |
|
| 813 |
|
| 814 |
let prefixDeviceadaptation = require('caniuse-lite/data/features/css-deviceadaptation') |
| 815 |
|
| 816 |
f(prefixDeviceadaptation, browsers => |
| 817 |
prefix(['@viewport'], { |
| 818 |
browsers, |
| 819 |
feature: 'css-deviceadaptation' |
| 820 |
}) |
| 821 |
) |
| 822 |
|
| 823 |
|
| 824 |
let prefixResolut = require('caniuse-lite/data/features/css-media-resolution') |
| 825 |
|
| 826 |
f(prefixResolut, { match: /( x($| )|a #2)/ }, browsers => |
| 827 |
prefix(['@resolution'], { |
| 828 |
browsers, |
| 829 |
feature: 'css-media-resolution' |
| 830 |
}) |
| 831 |
) |
| 832 |
|
| 833 |
|
| 834 |
let prefixTextAlignLast = require('caniuse-lite/data/features/css-text-align-last') |
| 835 |
|
| 836 |
f(prefixTextAlignLast, browsers => |
| 837 |
prefix(['text-align-last'], { |
| 838 |
browsers, |
| 839 |
feature: 'css-text-align-last' |
| 840 |
}) |
| 841 |
) |
| 842 |
|
| 843 |
|
| 844 |
let prefixCrispedges = require('caniuse-lite/data/features/css-crisp-edges') |
| 845 |
|
| 846 |
f(prefixCrispedges, { match: /y x|a x #1/ }, browsers => |
| 847 |
prefix(['pixelated'], { |
| 848 |
browsers, |
| 849 |
feature: 'css-crisp-edges', |
| 850 |
props: ['image-rendering'] |
| 851 |
}) |
| 852 |
) |
| 853 |
|
| 854 |
f(prefixCrispedges, { match: /a x #2/ }, browsers => |
| 855 |
prefix(['image-rendering'], { |
| 856 |
browsers, |
| 857 |
feature: 'css-crisp-edges' |
| 858 |
}) |
| 859 |
) |
| 860 |
|
| 861 |
|
| 862 |
let prefixLogicalProps = require('caniuse-lite/data/features/css-logical-props') |
| 863 |
|
| 864 |
f(prefixLogicalProps, browsers => |
| 865 |
prefix( |
| 866 |
[ |
| 867 |
'border-inline-start', |
| 868 |
'border-inline-end', |
| 869 |
'margin-inline-start', |
| 870 |
'margin-inline-end', |
| 871 |
'padding-inline-start', |
| 872 |
'padding-inline-end' |
| 873 |
], |
| 874 |
{ |
| 875 |
browsers, |
| 876 |
feature: 'css-logical-props' |
| 877 |
} |
| 878 |
) |
| 879 |
) |
| 880 |
|
| 881 |
f(prefixLogicalProps, { match: /x\s#2/ }, browsers => |
| 882 |
prefix( |
| 883 |
[ |
| 884 |
'border-block-start', |
| 885 |
'border-block-end', |
| 886 |
'margin-block-start', |
| 887 |
'margin-block-end', |
| 888 |
'padding-block-start', |
| 889 |
'padding-block-end' |
| 890 |
], |
| 891 |
{ |
| 892 |
browsers, |
| 893 |
feature: 'css-logical-props' |
| 894 |
} |
| 895 |
) |
| 896 |
) |
| 897 |
|
| 898 |
|
| 899 |
let prefixAppearance = require('caniuse-lite/data/features/css-appearance') |
| 900 |
|
| 901 |
f(prefixAppearance, { match: /#2|x/ }, browsers => |
| 902 |
prefix(['appearance'], { |
| 903 |
browsers, |
| 904 |
feature: 'css-appearance' |
| 905 |
}) |
| 906 |
) |
| 907 |
|
| 908 |
|
| 909 |
let prefixSnappoints = require('caniuse-lite/data/features/css-snappoints') |
| 910 |
|
| 911 |
f(prefixSnappoints, browsers => |
| 912 |
prefix( |
| 913 |
[ |
| 914 |
'scroll-snap-type', |
| 915 |
'scroll-snap-coordinate', |
| 916 |
'scroll-snap-destination', |
| 917 |
'scroll-snap-points-x', |
| 918 |
'scroll-snap-points-y' |
| 919 |
], |
| 920 |
{ |
| 921 |
browsers, |
| 922 |
feature: 'css-snappoints' |
| 923 |
} |
| 924 |
) |
| 925 |
) |
| 926 |
|
| 927 |
|
| 928 |
let prefixRegions = require('caniuse-lite/data/features/css-regions') |
| 929 |
|
| 930 |
f(prefixRegions, browsers => |
| 931 |
prefix(['flow-into', 'flow-from', 'region-fragment'], { |
| 932 |
browsers, |
| 933 |
feature: 'css-regions' |
| 934 |
}) |
| 935 |
) |
| 936 |
|
| 937 |
|
| 938 |
let prefixImageSet = require('caniuse-lite/data/features/css-image-set') |
| 939 |
|
| 940 |
f(prefixImageSet, browsers => |
| 941 |
prefix(['image-set'], { |
| 942 |
browsers, |
| 943 |
feature: 'css-image-set', |
| 944 |
props: [ |
| 945 |
'background', |
| 946 |
'background-image', |
| 947 |
'border-image', |
| 948 |
'cursor', |
| 949 |
'mask', |
| 950 |
'mask-image', |
| 951 |
'list-style', |
| 952 |
'list-style-image', |
| 953 |
'content' |
| 954 |
] |
| 955 |
}) |
| 956 |
) |
| 957 |
|
| 958 |
|
| 959 |
let prefixWritingMode = require('caniuse-lite/data/features/css-writing-mode') |
| 960 |
|
| 961 |
f(prefixWritingMode, { match: /a|x/ }, browsers => |
| 962 |
prefix(['writing-mode'], { |
| 963 |
browsers, |
| 964 |
feature: 'css-writing-mode' |
| 965 |
}) |
| 966 |
) |
| 967 |
|
| 968 |
|
| 969 |
let prefixCrossFade = require('caniuse-lite/data/features/css-cross-fade') |
| 970 |
|
| 971 |
f(prefixCrossFade, browsers => |
| 972 |
prefix(['cross-fade'], { |
| 973 |
browsers, |
| 974 |
feature: 'css-cross-fade', |
| 975 |
props: [ |
| 976 |
'background', |
| 977 |
'background-image', |
| 978 |
'border-image', |
| 979 |
'mask', |
| 980 |
'list-style', |
| 981 |
'list-style-image', |
| 982 |
'content', |
| 983 |
'mask-image' |
| 984 |
] |
| 985 |
}) |
| 986 |
) |
| 987 |
|
| 988 |
|
| 989 |
let prefixReadOnly = require('caniuse-lite/data/features/css-read-only-write') |
| 990 |
|
| 991 |
f(prefixReadOnly, browsers => |
| 992 |
prefix([':read-only', ':read-write'], { |
| 993 |
browsers, |
| 994 |
feature: 'css-read-only-write', |
| 995 |
selector: true |
| 996 |
}) |
| 997 |
) |
| 998 |
|
| 999 |
|
| 1000 |
let prefixTextEmphasis = require('caniuse-lite/data/features/text-emphasis') |
| 1001 |
|
| 1002 |
f(prefixTextEmphasis, browsers => |
| 1003 |
prefix( |
| 1004 |
[ |
| 1005 |
'text-emphasis', |
| 1006 |
'text-emphasis-position', |
| 1007 |
'text-emphasis-style', |
| 1008 |
'text-emphasis-color' |
| 1009 |
], |
| 1010 |
{ |
| 1011 |
browsers, |
| 1012 |
feature: 'text-emphasis' |
| 1013 |
} |
| 1014 |
) |
| 1015 |
) |
| 1016 |
|
| 1017 |
|
| 1018 |
let prefixGrid = require('caniuse-lite/data/features/css-grid') |
| 1019 |
|
| 1020 |
f(prefixGrid, browsers => { |
| 1021 |
prefix(['display-grid', 'inline-grid'], { |
| 1022 |
browsers, |
| 1023 |
feature: 'css-grid', |
| 1024 |
props: ['display'] |
| 1025 |
}) |
| 1026 |
prefix( |
| 1027 |
[ |
| 1028 |
'grid-template-columns', |
| 1029 |
'grid-template-rows', |
| 1030 |
'grid-row-start', |
| 1031 |
'grid-column-start', |
| 1032 |
'grid-row-end', |
| 1033 |
'grid-column-end', |
| 1034 |
'grid-row', |
| 1035 |
'grid-column', |
| 1036 |
'grid-area', |
| 1037 |
'grid-template', |
| 1038 |
'grid-template-areas', |
| 1039 |
'place-self' |
| 1040 |
], |
| 1041 |
{ |
| 1042 |
browsers, |
| 1043 |
feature: 'css-grid' |
| 1044 |
} |
| 1045 |
) |
| 1046 |
}) |
| 1047 |
|
| 1048 |
f(prefixGrid, { match: /a x/ }, browsers => |
| 1049 |
prefix(['grid-column-align', 'grid-row-align'], { |
| 1050 |
browsers, |
| 1051 |
feature: 'css-grid' |
| 1052 |
}) |
| 1053 |
) |
| 1054 |
|
| 1055 |
|
| 1056 |
let prefixTextSpacing = require('caniuse-lite/data/features/css-text-spacing') |
| 1057 |
|
| 1058 |
f(prefixTextSpacing, browsers => |
| 1059 |
prefix(['text-spacing'], { |
| 1060 |
browsers, |
| 1061 |
feature: 'css-text-spacing' |
| 1062 |
}) |
| 1063 |
) |
| 1064 |
|
| 1065 |
|
| 1066 |
let prefixAnyLink = require('caniuse-lite/data/features/css-any-link') |
| 1067 |
|
| 1068 |
f(prefixAnyLink, browsers => |
| 1069 |
prefix([':any-link'], { |
| 1070 |
browsers, |
| 1071 |
feature: 'css-any-link', |
| 1072 |
selector: true |
| 1073 |
}) |
| 1074 |
) |
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 |
let bidiIsolate = require('caniuse-lite/data/features/mdn-css-unicode-bidi-isolate') |
| 1079 |
|
| 1080 |
f(bidiIsolate, browsers => |
| 1081 |
prefix(['isolate'], { |
| 1082 |
browsers, |
| 1083 |
feature: 'css-unicode-bidi', |
| 1084 |
props: ['unicode-bidi'] |
| 1085 |
}) |
| 1086 |
) |
| 1087 |
|
| 1088 |
let bidiPlaintext = require('caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext') |
| 1089 |
|
| 1090 |
f(bidiPlaintext, browsers => |
| 1091 |
prefix(['plaintext'], { |
| 1092 |
browsers, |
| 1093 |
feature: 'css-unicode-bidi', |
| 1094 |
props: ['unicode-bidi'] |
| 1095 |
}) |
| 1096 |
) |
| 1097 |
|
| 1098 |
let bidiOverride = require('caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override') |
| 1099 |
|
| 1100 |
f(bidiOverride, { match: /y x/ }, browsers => |
| 1101 |
prefix(['isolate-override'], { |
| 1102 |
browsers, |
| 1103 |
feature: 'css-unicode-bidi', |
| 1104 |
props: ['unicode-bidi'] |
| 1105 |
}) |
| 1106 |
) |
| 1107 |
|
| 1108 |
|
| 1109 |
let prefixOverscroll = require('caniuse-lite/data/features/css-overscroll-behavior') |
| 1110 |
|
| 1111 |
f(prefixOverscroll, { match: /a #1/ }, browsers => |
| 1112 |
prefix(['overscroll-behavior'], { |
| 1113 |
browsers, |
| 1114 |
feature: 'css-overscroll-behavior' |
| 1115 |
}) |
| 1116 |
) |
| 1117 |
|
| 1118 |
|
| 1119 |
let prefixTextOrientation = require('caniuse-lite/data/features/css-text-orientation') |
| 1120 |
|
| 1121 |
f(prefixTextOrientation, browsers => |
| 1122 |
prefix(['text-orientation'], { |
| 1123 |
browsers, |
| 1124 |
feature: 'css-text-orientation' |
| 1125 |
}) |
| 1126 |
) |
| 1127 |
|
| 1128 |
|
| 1129 |
let prefixPrintAdjust = require('caniuse-lite/data/features/css-print-color-adjust') |
| 1130 |
|
| 1131 |
f(prefixPrintAdjust, browsers => |
| 1132 |
prefix(['print-color-adjust', 'color-adjust'], { |
| 1133 |
browsers, |
| 1134 |
feature: 'css-print-color-adjust' |
| 1135 |
}) |
| 1136 |
) |