histoire-dev / histoire

⚡ Fast and beautiful interactive component playgrounds, powered by Vite
https://histoire.dev
MIT License
3.15k stars 185 forks source link

Buggy resize on responsive preview #592

Open goulashify opened 1 year ago

goulashify commented 1 year ago

Describe the bug

When responsive stories are resized to be smaller vertically, the bottom of the story sticks to the bottom of the viewport.

Reproduction

Go to the demo page, try to resize a story vertically (pull up the bottom).

System Info

System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.08 GB / 32.00 GB
    Shell: 3.6.1 - /usr/local/bin/fish
  Binaries:
    Node: 20.6.1 - ~/.local/share/nvm/v20.6.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/.local/share/nvm/v20.6.1/bin/npm
  Browsers:
    Chrome: 117.0.5938.88
    Safari: 16.6
  npmPackages:
    @histoire/plugin-vue: ^0.17.1 => 0.17.1 
    @vitejs/plugin-vue: ^4.3.4 => 4.3.4 
    histoire: ^0.17.0 => 0.17.0 
    vite: ^4.4.9 => 4.4.9

Used Package Manager

npm

Validations

goulashify commented 1 year ago

Looking from the outside, this is simple to fix here w/ either: a) adding !important to the enabled fit-content rules, or b) toggling between htw-h-full and htw-h-fit as needed. Not sure what other functionality that might break though.

See video here.

PR welcome?

50rayn commented 10 months ago

Hello @goulashify ,

Here is Contribution Guide to the Histoire. I suppose the PR is welcomed 🙂

minddust commented 10 months ago

quick-fix/workaround in case it's blocking your development like mine 😅

  div.htw-h-fit:has(> div.bind-preview-bg) {
    height: fit-content !important;
  }