Skip to content

An Ember component that scales itself to fill available space.

License

Notifications You must be signed in to change notification settings

cardstack/squishable-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 10, 2019
3a2051b · Jun 10, 2019

History

22 Commits
Jun 10, 2019
Oct 20, 2016
Jun 10, 2019
Jun 10, 2019
Oct 20, 2016
Oct 20, 2016
Oct 20, 2016
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Oct 20, 2016
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019
Jun 10, 2019

Repository files navigation

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;