A tile container for Polymer.
Install the component using Bower:
$ bower install teaegg/polymer-tile --save
Or download as ZIP.
-
Import Web Components' polyfill:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
-
Import polymer-tile:
<link rel="import" href="bower_components/polymer-tile/polymer-tile.html">
-
Start using it!
<style> .tile-1, .tile-2, .tile-4 { box-sizing: border-box; position: relative; } .tile-1 { width: 120px; height: 120px; float: left; } .tile-2 { width: 248px; height: 120px; margin: 4px; } .tile-2 .tile-1:nth-child(even) { margin-left: 8px; } .tile-4 { width: 248px; height: 248px; margin: 4px; } </style> <polymer-tile fit> <div class="tile-2"> <div class="tile-1" style="background: yellow;"></div> <div class="tile-1" style="background: red;"></div> </div> <div class="tile-2" style="background: orange;"></div> <div class="tile-4" style="background: purple;"></div> </polymer-tile>
Attribute | Options | Default | Description |
---|---|---|---|
orient |
string | h |
Orientation of the scroller to be observed (v for vertical, h for horizontal) |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D