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

Incorrect size/position when background-size is 'contain' #59

Open
Leftium opened this issue Mar 28, 2019 · 0 comments
Open

Incorrect size/position when background-size is 'contain' #59

Leftium opened this issue Mar 28, 2019 · 0 comments

Comments

@Leftium
Copy link

Leftium commented Mar 28, 2019

Live demo: https://ripples-bug.glitch.me/ (Resize so window is much wider than tall)

Expected: Ripples canvas should be square
Actual: Ripples canvas is rectangular

If Ripples is disabled, the background image is square, and rendered as a square as a result of background-size:contain. However, the Ripples canvas is sized to the full geometry of its parent element.

(Is this the "TODO: background-clip" from the source?)


I quickly hacked my own version of Ripples that forces the canvas to be a correctly positioned square during initialization and updateSize(), but it would be nice to have a general fix.

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

No branches or pull requests

1 participant