package.elm-lang.org
package.elm-lang.org copied to clipboard
Images linked in package READMEs are not scaled
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.
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.
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:
PR for that https://github.com/elm-lang/package.elm-lang.org/pull/242