gridaco / assistant

🤖 Bring your Figma design & development pipeline to the next level - with design to code, in-design-content-management, component management, tools for faster design
https://grida.co/assistant
Other
572 stars 47 forks source link

[Bug] Responsive preview to shrink its height regarding to scaled inner iframe #170

Open softmarshmallow opened 2 years ago

softmarshmallow commented 2 years ago
  /* FIXME: this should be a height
  // this should work, but the flex is making inner iframe height to shrink.
  height: max(${(props) => props.heightscale * 100}%, 100%);
    ref:
    - https://stackoverflow.com/questions/51288769/scaling-a-flexbox-child-with-transform-leaves-empty-space
    - https://www.reddit.com/r/css/comments/q5cvei/css_fitcontent_on_parent_wont_work_for_scaled_item/
  */

The height calculation logic is decent, but it seems to be broken due to flex use. height: max(${(props) => props.heightscale * 100}%, 100%);

This is a known issue, will be included in the production release. It will be fixed in short time.

Screen Shot 2021-10-11 at 3 30 13 AM Screen Shot 2021-10-11 at 3 30 54 AM