squishable-container

1.0.0 • Public • Published

squishable-container

This addon provides a container that scales itself to match the available amount of space.

ember install squishable-container

Usage

Wrap your content in squishable-container:

{{#squishable-container}}
  Your content here.
{{/squishable-container}}

Now if anything else changes the width available to squishable-container, it will scale its content up or down to match.

squishable-container necessarily needs to decide at what width it should set the scale to 100%. By default, it uses the full viewport width. You can pick a different width by setting the width and unit properties:

{{#squishable-container width=800 unit="px"}}
  Your content here.
{{/squishable-container}}

Supported units include em, vw, px, rem, and ex;

Package Sidebar

Install

npm i squishable-container

Weekly Downloads

10

Version

1.0.0

License

MIT

Unpacked Size

6.01 kB

Total Files

10

Last publish

Collaborators

  • ef4