Comments (5)
Wouldn't this make the image wait on the page for layout?
from html.
It would, but that's not a problem for lazy-loaded images or other images that are farther down the page.
from html.
Similar discussion happening here: w3c/csswg-drafts#5889
from html.
I can see future in which
<picture>
<source container="(width > 500px)" srcset="a">
<img loading="lazy" src="b">
</picture>
works. But:
- 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. - 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.
Related: #8007
from html.
Related Issues (20)
- Document "rendering suppression for view transitions" also suppresses "perform pending transition operations" HOT 7
- Broaden <nav>'s semantics, making <nav> suitable as an application-like navigator within a single page HOT 5
- "check if an access between two browsing contexts should be reported" can be called with null browsing context but doesn't handle it HOT 1
- Proposal: Tab Knowledge API -- gaining knowledge about same-origin tabs HOT 9
- Browsers synchronously fire `pagehide` & `unload`, while the standard doesn't HOT 1
- Limit NavigationActivation on pageswap to same-origin navigations with no cross-origin redirects
- Upcoming WHATNOT meeting on 3/14/2024 HOT 3
- Restrict when MessagePort's onclose event can fire HOT 12
- HostEnsureCanCompileStrings definition mismatch HOT 5
- Upcoming WHATNOT meeting on 3/21/2024 HOT 2
- Toggle/cycle buttons HOT 29
- Proposal: pause iframe media when not rendered HOT 8
- `writingsuggestions` might need to default to "off" HOT 15
- Possibility to export drawImage() rendering algorithm HOT 9
- template element declarative shadow tree IDL attributes HOT 8
- Web compat: Navigating a lazy-loading iframe with location.replace HOT 3
- Upcoming WHATNOT meeting on 3/28/2024 HOT 1
- Recommend against using the <q> element (or fix its behavior) HOT 4
- Form not submitted warning message before unload HOT 2
- Reflected IDL attributes of type FrozenArray<T>? don't create a FrozenArray HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.