package.elm-lang.org icon indicating copy to clipboard operation
package.elm-lang.org copied to clipboard

Images linked in package READMEs are not scaled

Open bobwhitelock opened this issue 8 years ago • 3 comments
trafficstars

As originally described in https://github.com/rtfeldman/elm-css/issues/283.

While images linked from package READMEs are shown scaled and centred when viewed on Github (e.g. here), on http://package.elm-lang.org they are shown at the original image size. This means that they can overflow the border of the rest of the README and overlap the 'module docs' menu to the right, as can be seen here, or as an image here.

While package authors could attempt to work around this by sizing images appropriately themselves, it seems more the responsibility of package.elm-lang.org to ensure it appropriately sizes images it wants to display; I imagine it would also be difficult to manually size images appropriately for both places without there being any loss of resolution in one case for users with certain monitor resolutions.

bobwhitelock avatar Jul 01 '17 15:07 bobwhitelock

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot avatar Jul 01 '17 15:07 process-bot

Setting a scoped max-width: 100% on any img tags would be a pretty simple first step. This is the result of doing so via dev tools on elm-css:

screen shot 2017-07-02 at 10 48 54 pm

tgecho avatar Jul 03 '17 02:07 tgecho

PR for that https://github.com/elm-lang/package.elm-lang.org/pull/242

akoppela avatar Jul 03 '17 17:07 akoppela