pages-themes / slate

Slate is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/slate/
Creative Commons Zero v1.0 Universal
301 stars 975 forks source link

Fix image overflow when media screen is smaller than 980px #3

Closed Edditoria closed 7 years ago

Edditoria commented 7 years ago

When the screen width is too small (e.g. view in mobile device), some large image may overflow.

To fix this, I make the img becomes max-width: 100%; when media screen is below 992px. 992px is Medium Devices Desktops in Bootstrap. Hopefully only 1 line of css for this break-point is not too rare.

p.s. Put the line in max-width: 480px is not enough. And, for medium devices, fixing a certain width for images may be too small. That's why I make it 100%.

benbalter commented 7 years ago

Thanks @Edditoria!