1045 1856 1222 1078 1570 1269 1626 1090 1818 1281 1044 1271 1125 1548 1286 1483 1527 1208 1588 1468 1803 1904 1714 1455 1590 1729 1892 1793 1633 1474 1532 1792 1339 1210 1465 1416 1999 1556 1528 1478 1918 1797 1413 1956 1522 1347 1558 1179 1892 1938 1548 1971 1137 1963 1998 1100 1351 1714 1659 1291 1092 1927 1247 1684 1288 1215 1467 1533 1710 1180 1251 1047 1491 1480 1622 1199 1370 1869 1993 1437 1537 1941 1048 1699 1384 1490 1562 1547 1598 1611 1111 1939 1477 1906 1823 1906 1762 1779 1936 Show CSS browser support data with css-browser-support | PHPnews.io

PHPnews.io

Show CSS browser support data with css-browser-support

Written by Bram.us / Original link on Jul. 7, 2022

css-browser-support-560x519.png

If you want to include Browser Support tables on your site, you can use this package by Stephanie Eckles

Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentages.

Per feature that ask it, you get back an object with the browsers and the data:

{
  'aspect-ratio': {
    chrome: {
      sinceVersion: '88',
      flagged: true,
      globalSupport: 22.46,
      browserTitle: 'Chrome'
    },
    chrome_android: {
      sinceVersion: '88',
      flagged: false,
      globalSupport: 41.34,
      browserTitle: 'Chrome Android'
    },
    edge: {
      sinceVersion: '88',
      flagged: false,
      globalSupport: 3.88,
      browserTitle: 'Edge'
    },
    // ... continued for all browsers
    globalSupport: 86.49
  }
}

Stephanie also released a plugin for use with 11ty.

css-browser-support

Do note that if you statically build your site, you will have to update dependencies and rebuild regularly to have up-to-date support data

bram link tutorialzine krakjoe bram

« Design Tokens CLI - Be the browser’s mentor, not its micromanager »