Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanseddon/picture-component

<x-picture> element for responsive images
https://github.com/ryanseddon/picture-component

Last synced: 30 days ago
JSON representation

<x-picture> element for responsive images

Awesome Lists containing this project

README

        

# Picture component

An implementation of the proposed `` element. See [original repo](https://github.com/scottjehl/picturefill) for something to actually use in production.

## How to use

This web component uses the Polymer library.

1. Make sure you have Polymers `platform.min.js` included in your page
1. Import component ``
1. A picture element is contained inside a `` element
1. For each sized image specify as `` inside ``

```html



```

## Experiment only

Please don't use this, that's what the [picturefill](https://github.com/scottjehl/picturefill) polyfill is for. This version is missing default image support and image swapping on resize.

## Made as part of talk

I did a talk on Web Components and created a whole bunch of components to dog food the talk itself. See master repo [web-components](https://github.com/ryanseddon/web-components).