Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve asset scaling in iframe when embedding a design #255

Closed
berezovskyicom opened this issue Apr 16, 2020 · 1 comment · Fixed by #263
Closed

Improve asset scaling in iframe when embedding a design #255

berezovskyicom opened this issue Apr 16, 2020 · 1 comment · Fixed by #263
Assignees

Comments

@berezovskyicom
Copy link
Contributor

Feedback from user:

I have found a possibility to use abstract to embed my designs into my portfolio. However, I noticed that there is an issue with scaling and I'm writing this letter to provide a suggestion with the hope that it will be swiftly implemented.
Here's a code I used to embed the design into my website:

<iframe
src="https://app.abstract.com/embed/2ecdd714-6137-455f-9049-45063cdd79e8"
width="100%"
height="auto"
frameborder="0"
></iframe>

I set the width to 100% so that the embed element would become responsive to the browser's width. However, I can only set height in pixels, which is a dealbreaker. Can you update your SDK so that artwork within Abstract's embed frame would scale to 100% and then height would be automatically adjusted? Right now for some reason height is set to a very low value and I can only increase it by increasing height value in pixels manually. It would be better if the frame was controlled by the aspect ratio of the artwork inside a frame and height would adjust itself based on width.

Image

@amccloud
Copy link
Contributor

@berezovskycom this can be solved outside of the sdk and is pretty typical for embeds. We should update the documentation to show an example of maintaining aspect ratios

Example https://jsfiddle.net/m9pzh751/2/ (can resize embed to see it work)

More details can also be found here
https://jameshfisher.com/2017/08/30/how-do-i-make-a-full-width-iframe/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants