mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00

We still don't know how to resolve font-relative lengths in <img sizes> since we don't always have font size information available at this stage in the pipeline, but we can at least handle viewport-relative lengths. This fixes an issue on many websites where low-resolution images were loaded (appropriate for a small viewport) even when the viewport is big.
10 lines
359 B
HTML
10 lines
359 B
HTML
<!doctype html>
|
|
<img
|
|
sizes="100vw"
|
|
srcset="
|
|
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P4z8DwHwAFAAH/F1FwBgAAAABJRU5ErkJggg== 100w,
|
|
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NgaGD4DwAChAGAZM0bBgAAAABJRU5ErkJggg== 200w
|
|
"
|
|
width="400"
|
|
height="400"
|
|
/>
|