Socket
Socket
Sign inDemoInstall

@polymer/iron-fit-behavior

Package Overview
Dependencies
2
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @polymer/iron-fit-behavior

Fits an element inside another element


Version published
Weekly downloads
21K
decreased by-14.44%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Build status

Demo and API docs

Polymer.IronFitBehavior

Polymer.IronFitBehavior fits an element in another element using max-height and max-width, and optionally centers it in the window or another element.

The element will only be sized and/or positioned if it has not already been sized and/or positioned by CSS.

CSS propertiesAction
position setElement is not centered horizontally or vertically
top or bottom setElement is not vertically centered
left or right setElement is not horizontally centered
max-height setElement respects max-height
max-width setElement respects max-width

Polymer.IronFitBehavior can position an element into another element using verticalAlign and horizontalAlign. This will override the element's css position.

  <div class="container">
    <iron-fit-impl vertical-align="top" horizontal-align="auto">
      Positioned into the container
    </iron-fit-impl>
  </div>

Use noOverlap to position the element around another element without overlapping it.

  <div class="container">
    <iron-fit-impl no-overlap vertical-align="auto" horizontal-align="auto">
      Positioned around the container
    </iron-fit-impl>
  </div>

Keywords

FAQs

Last updated on 12 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc