Elchi3 / mdn-doc-tests

:no_entry_sign: UNMAINTAINED :no_entry_sign: This used to check MDN docs against some tests and cleanup tasks while editing, but add-on SDK based add-ons are obsolete. Use https://github.com/mdn/doc-linter-webextension and https://github.com/mdn/doc-linter-rules instead.
Mozilla Public License 2.0
10 stars 8 forks source link

Test if large images are in the content #137

Closed Elchi3 closed 7 years ago

Elchi3 commented 8 years ago

If there are is a sidebar navigation ("quicklinks") and the table of contents (TOC) is enabled (we are working on having quicklinks and TOC enabled almost everywhere on MDN), the max-width in the middle is 679px. 679px comes from the main container size being 1400px and the main wiki article being 48.5% wide. Images that are larger than this will get resized by img { max-width: 100% };

As larger images are resized to this width anyway, we should warn if images are too wide. Also large images (e.g. larger than 2000x2000 etc.) are quite slow too load and should be avoided.

Elchi3 commented 8 years ago

We might want to investigate how things look like on mobile devices, and if the max-width of 679px makes sense there as well. I have Android Firefox and Chrome and it seems like it looks fine there in portrait/landscape.

SebastianZ commented 8 years ago

Is the width on mobile devices the same?

Larger than 679px (should probably be calculated from the page's CSS) should be a warning and larger than e.g. 2000px should be an error.

Sebastian

Elchi3 commented 7 years ago

Re-filed https://github.com/mdn/doc-linter-rules/issues/17