Giter Club home page Giter Club logo

Comments (9)

chrisdavidmills avatar chrisdavidmills commented on May 21, 2024

@RisingThunder I made some changes to this example recently, due to similar feedback from somewhere else. IS it any better now? If not, I'll have a look at it in our next work sprint.

from content.

RisingThunder avatar RisingThunder commented on May 21, 2024

I'll check it, going on a work stretch, so be a couple of days or so, Thanks!!

from content.

RisingThunder avatar RisingThunder commented on May 21, 2024

Note: I updated/fixed the links in my original post.
Hi Chris, apologize for the delay in responding, work and family...
No, my understanding of how the "Resolution switching: Same size, different resolutions" example is still inverse of the given MDN web docs example.
For example (the first fire truck on my media page), to get the results of the low resolution image (fire-truck-320w.png) loaded to my cell phone screen, and the higher resolution image (fire-truck-640w.png) loaded to my desktop monitor, I'm using the below,

<img srcset="images/fire-truck-320w.png 2x,
             images/fire-truck-480w.png 1.5x,
             images/fire-truck-640w.png"
     src="images/fire-truck-640w.png" alt=" Image of a URAL 4320 fire truck AA-8.0" id="firetruckimg">

which is the inverse of the MDN web docs example (basically, swapping the x-descriptors).
The given MDN web docs article example is;

<img srcset="elva-fairy-320w.jpg,
             elva-fairy-480w.jpg 1.5x,
             elva-fairy-640w.jpg 2x"
     src="elva-fairy-640w.jpg" alt="Elva dressed as a fairy">

However, this MDN web docs example of the linked "srcset-resolutions.html" loads the higher resolution image (elva-fairy-640w.jpg) to my cell phone screen, and the lower resolution image (elva-fairy-320w.jpg) to my desktop. Which is the inverse of what is attempting to be accomplished, as I understand it anyway.
Thanks!!

from content.

chrisdavidmills avatar chrisdavidmills commented on May 21, 2024

I've just not gotten to this one, for years now, and it seems like a fairly important point to get right. @rachelandrew , can you have a look at this one soonish?

from content.

rachelandrew avatar rachelandrew commented on May 21, 2024

I did look at this and couldn't reproduce the issue, or perhaps am not understanding the issue. Could you reproduce the problem @chrisdavidmills ?

from content.

chrisdavidmills avatar chrisdavidmills commented on May 21, 2024

The basic TL;DR is that @RisingThunder 's responsive images example on https://risingthunder.github.io/media.html is not working correctly (not getting the correct images loaded for narrow screens, and wide screens), and we need to work out if they have done something wrong, and/or if the information in my Responsive images article is wrong.

from content.

rachelandrew avatar rachelandrew commented on May 21, 2024

I'll have another look but last time I looked I'm afraid I couldn't make head nor tail of it as I wasn't seeing the same thing as reported.

from content.

rachelandrew avatar rachelandrew commented on May 21, 2024

So the MDN example loads the correct image to desktop for me (the larger image) because my desktop has a high res screen. So that is correct as far as my understanding goes. This is looking at screen resolution not "narrow or wide screens". This whole thread seems to assume a small screen is low res and a large one high res, which isn't necessarily the case.

However maybe I'm the one confused :)

from content.

chrisdavidmills avatar chrisdavidmills commented on May 21, 2024

Hrm, maybe we can close it then, if the MDN page makes sense.

from content.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.