sindresorhus / Plash

💦 Make any website your Mac desktop wallpaper
https://sindresorhus.com/plash
MIT License
3.51k stars 130 forks source link

Aspect-fill images automatically #60

Closed colejd closed 4 years ago

colejd commented 4 years ago

Resolves #49.

When an image is loaded, it will stretch to aspect-fill the screen.

sindresorhus commented 4 years ago

We need to rename the method.

Can you include a code comment for a URL that can be used for testing it?

colejd commented 4 years ago

Fixed.

Here's some images I used to test on a 4k monitor:

Normal test: desktoptest

Tall test: DesktopTallTest

Wide test: DesktopWideTest

Small test: SmallDesktopTest

Come to think of it, I think the first and last images are probably sufficient, but there you go. All images have a 10px border if you want to count pixels.

sindresorhus commented 4 years ago

Could you put the first and last in a Codepen/JSFiddle and add code comment with links, so it can easily be tested for someone needing to touch the code in the future?

sindresorhus commented 4 years ago

I think we should also mention the behavior in the readme. In one sentence.

colejd commented 4 years ago

Here's the Codepen: https://codepen.io/colejd/pen/MWyxezd

I'll add it to the code in just a moment.

sindresorhus commented 4 years ago

Thanks :)