Polyfill.io

Interesting service by Polyfill.io. Just include their polyfill.js file and it’ll include a set of polyfills specifically for the browser used:

<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

Polyfill.io reads the User-Agent header of each request and returns polyfills that are suitable for the requesting browser.

This one could come in handy for older projects that have gathered some dust over time (And that don’t use Babel/Babel Polyfill yet) .

Polyfill.io →

This reminds me of Dean Edwards’ IE7.js from (way) back in the day 🙂

CSS-Grid-Polyfill

CSS Grid Layout Polyfill:

The polyfill’s css parser was built by following the CSS Syntax 3 specification, the polyfill should be able to process any css stylesheet. It can react to dynamic pseudo-classes like ‘:hover’, to media queries changes or window resize events. It also detects changes to the DOM that may affect the layout of your grid.

There are a few quirks though:

Because the layout is done asynchronously, the polyfill may play badly with other libraries that expect layout to be performed synchronously. This is particularly true if you plan to animate your grid.

The whole polyfill is very sensitive to changes to the “box-sizing” property (and many frameworks like Bootstrap do make use of it); again, this will be ironed out soon but you have to be aware.

The polyfill doesn’t like fixed/absolutely positioned grid items. If you want to use them, just put them in a dummy wrapper, it will work fine.

CSS-Grid-Polyfill – A working implementation of css grids for current browsers →

CSS conic-gradient() Polyfill

conic-gradient

<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<script src="conic-gradient.js"></script>

Conic gradients are awesome, but browsers haven’t realized yet. This polyfill lets you experiment with them now.

By Lea Verou. Automatically creates an SVG which is set as the background. Uses -prefix-free.

Alternatively you can also use the JavaScript API behind it directly:

var gradient = new ConicGradient({
    stops: "gold 40%, #f06 0", // required
    repeating: true, // Default: false
    size: 400 // Default: Math.max(innerWidth, innerHeight)
});

console.log(gradient.svg); // SVG markup
console.log(gradient.png); // PNG image (fixed dimensions) as a data URL
console.log(gradient.dataURL); // data URL
console.log(gradient.blobURL); // blog URL

CSS conic-gradient() Polyfill →

X-Tag: Web Components’ Custom Elements Polyfill

X-Tag is a powerful sugar library primarily focused on wrapping and enhancing one of the draft-state Web Component specs: Custom Elements

With Custom Elements, you could for example just write up <x-map data-key="6c86bb5b30a442c180772d978f3ae000"></x-map> in your HTML and have it rendered as a full blown map.

Speed Up App Development with X-Tag and Web Components →
X-Tag – The Custom Elements Polylib →