MemeLabs / Rustla2

Livestream viewing with chat
https://strims.gg
MIT License
44 stars 24 forks source link

Attempt to make stream cards more responsive when changing chat window size #342

Closed Dman757 closed 2 years ago

Dman757 commented 2 years ago

This is a minor tweak to fix something that's bugged me about resizing the chat window, the stream thumbnails don't respond the shift in size.

Issue lies in media queries only responding to the browser window size and not the container size. So until container queries are a real thing, adding a responsive grid is the next best solution I could think of.

I'm not too familiar with bootstraps sizing so I hand rolled the css for this.

Before: Screenshot from 2021-10-12 22-26-31 After: Screenshot from 2021-10-12 22-24-37

slugalisk commented 2 years ago

i think we're already using flex so we could probably also just apply min/max-width to the tiles and use flex-wrap to deal with it.

we could also emulate container queries with js. like observe the container size and apply classes like grid--min_width_400, grid--min_width_800, etc... i used this in another project to normalize media queries for ios safari and it seems to work pretty well.

slugalisk commented 2 years ago

sweet, looks good 👍 thanks