Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/ | 03-May-2024 | - | 34 | 14 | ||
demo/ | 03-May-2024 | - | 209 | 160 | ||
test/ | 03-May-2024 | - | 1,104 | 927 | ||
.bower.json | D | 03-May-2024 | 1.2 KiB | 41 | 41 | |
.gitignore | D | 03-May-2024 | 17 | 2 | 1 | |
.travis.yml | D | 03-May-2024 | 784 | 25 | 24 | |
CONTRIBUTING.md | D | 03-May-2024 | 3.4 KiB | 78 | 39 | |
README.md | D | 03-May-2024 | 1.8 KiB | 58 | 31 | |
bower.json | D | 03-May-2024 | 862 | 32 | 31 | |
index.html | D | 03-May-2024 | 995 | 31 | 14 | |
iron-fit-behavior.html | D | 03-May-2024 | 20.4 KiB | 612 | 531 |
README.md
1 2<!--- 3 4This README is automatically generated from the comments in these files: 5iron-fit-behavior.html 6 7Edit those files, and our readme bot will duplicate them over here! 8Edit this file, and the bot will squash your changes :) 9 10The bot does some handling of markdown. Please file a bug if it does the wrong 11thing! https://github.com/PolymerLabs/tedium/issues 12 13--> 14 15[![Build status](https://travis-ci.org/PolymerElements/iron-fit-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-fit-behavior) 16 17_[Demo and API docs](https://elements.polymer-project.org/elements/iron-fit-behavior)_ 18 19 20##Polymer.IronFitBehavior 21 22`Polymer.IronFitBehavior` fits an element in another element using `max-height` and `max-width`, and 23optionally centers it in the window or another element. 24 25The element will only be sized and/or positioned if it has not already been sized and/or positioned 26by CSS. 27 28| CSS properties | Action | 29| --- | --- | 30| `position` set | Element is not centered horizontally or vertically | 31| `top` or `bottom` set | Element is not vertically centered | 32| `left` or `right` set | Element is not horizontally centered | 33| `max-height` set | Element respects `max-height` | 34| `max-width` set | Element respects `max-width` | 35 36`Polymer.IronFitBehavior` can position an element into another element using 37`verticalAlign` and `horizontalAlign`. This will override the element's css position. 38 39```html 40 <div class="container"> 41 <iron-fit-impl vertical-align="top" horizontal-align="auto"> 42 Positioned into the container 43 </iron-fit-impl> 44 </div> 45``` 46 47Use `noOverlap` to position the element around another element without overlapping it. 48 49```html 50 <div class="container"> 51 <iron-fit-impl no-overlap vertical-align="auto" horizontal-align="auto"> 52 Positioned around the container 53 </iron-fit-impl> 54 </div> 55``` 56 57 58