Giter Club home page Giter Club logo

Comments (5)

myakura avatar myakura commented on May 24, 2024

Wouldn't this make the image wait on the page for layout?

from html.

andy-blum avatar andy-blum commented on May 24, 2024

It would, but that's not a problem for lazy-loaded images or other images that are farther down the page.

from html.

andy-blum avatar andy-blum commented on May 24, 2024

Similar discussion happening here: w3c/csswg-drafts#5889

from html.

eeeps avatar eeeps commented on May 24, 2024

I can see future in which

<picture>
  <source container="(width > 500px)" srcset="a">
  <img loading="lazy" src="b">
</picture>

works. But:

  1. I think there are a lot of important, unanswered questions in the CSSWG thread about the performance impacts of this pattern. Anecdotally, I feel like art direction is especially used for above-the fold, hero/LCP images. And the only way out that I can see there - sizes on every ancestor container, worries me on a number of levels.
  2. What should happen here?
<picture>
  <source container="(width > 500px)" srcset="a">
  <img src="b">
</picture>

My first take is, if source elements use container (or whatever) but the img does not have loading=lazy, the container query ("container condition"?) always evaluates to false.

from html.

zcorpan avatar zcorpan commented on May 24, 2024

Related: #8007

from html.

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.