caniuse-embed-element

A custom elements wrapper around Ire Aderinokun's caniuse embed service

Usage no npm install needed!

<script type="module">
  import caniuseEmbedElement from 'https://cdn.skypack.dev/caniuse-embed-element';
</script>

README

caniuse-embed-element

A custom elements wrapper around Ire Aderinokun's caniuse embed service

A rendered can use table

Basic usage

<!-- Include the custom element script -->
<script src="node_modules/caniuse-embed-element/dist/caniuse-embed-element.min.js"></script>
<!-- Or from unpkg.com (other npm CDNs work too)-->
<script src="https://unpkg.com/caniuse-embed-element/dist/caniuse-embed-element.min.js"></script>

After loading the element script, use the caniuse-embed element in your HTML.

<!-- `feature` is the only required attribute -->
<caniuse-embed feature="css-focus-within"></caniuse-embed>

<!-- define the timeframe you're interested in -->
<caniuse-embed
  feature="mdn-css__properties__z-index"
  periods="future_1,current"
></caniuse-embed>

<!-- use accesssible colors -->
<caniuse-embed
  feature="focusin-focusout-events"
  show-accessible-colors="true"
></caniuse-embed>

Contributing

This custom element is really just a wrapper around Ire's hard work on caniuse.bitsofco.de because I prefer custom elements. :)

And I don't plan to add any new features to it.

Code of conduct

This project underlies a code of conduct.

License

This project is released under MIT license.