Skip to content

Add new responsive algorithm#152

Open
razzeee wants to merge 1 commit into
yanivam:mainfrom
razzeee:responsive-100
Open

Add new responsive algorithm#152
razzeee wants to merge 1 commit into
yanivam:mainfrom
razzeee:responsive-100

Conversation

@razzeee

@razzeee razzeee commented Jun 9, 2024

Copy link
Copy Markdown

Actually take up 100% of the window width - ignore, height, as we're calculating the width here.

image

Might fix #149

Actually take up 100% of the window width - ignore, height, as we're calculating the width here.

@Josh-Cena Josh-Cena left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a bad idea to hardcode the width in general, because as the issue said, this made the container unstylable. I'm also not a fan of two options that only differ in a magic constant. Maybe we can defer the width calculation to CSS, and then here use something like getClientBoundingBox to retrieve the dimensions instead?

@razzeee

razzeee commented Jul 29, 2024

Copy link
Copy Markdown
Author

I'm also not a fan of another variant, but it's the only way to do this without breaking api.

I couldn't get a bounding rect approach to work like I wanted.

@razzeee

razzeee commented Sep 26, 2024

Copy link
Copy Markdown
Author

Can we improve this somehow?

@Josh-Cena

Josh-Cena commented Sep 28, 2024

Copy link
Copy Markdown
Collaborator

IMO, responsive is just a nice default, and if you want something more customizable you can already just pass a number in pixels to size and you can implement your own logic for calculating the right size. The only new size option I'm personally wanting to see is making the size relative to the parent container rather than the window.

@razzeee

razzeee commented Oct 3, 2024

Copy link
Copy Markdown
Author

That would be helpful I guess. The idea with size as number is good, but it would be much easier, for my usecase, if I could set the height and the width would be automatically calculated.

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 this pull request may close these issues.

[BUG] Responsive size calculation is buggy

2 participants