Skip to content

Commit a956858

Browse files
committed
style(docs[css]): Correct misleading aspect-ratio comment to match actual rule
why: Comment claimed "height: auto + aspect-ratio" reserved space before load, but the aspect-ratio property was absent from the rule. The comment wrote a check the code didn't cash. what: - Rewrite comment to accurately describe what height: auto does - Note the CLS limitation for images without HTML width/height attributes
1 parent 64ddd77 commit a956858

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/_static/css/custom.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,10 @@ img {
376376
/* Docutils emits :width:/:height: as inline CSS (style="width: Xpx;
377377
* height: Ypx;") rather than HTML attributes. When Furo's
378378
* max-width: 100% constrains width below the declared value,
379-
* the fixed height causes distortion. height: auto + aspect-ratio
380-
* lets the browser compute the correct height from the intrinsic
381-
* ratio once loaded; before load, aspect-ratio reserves space
382-
* at the intended proportion — preventing both CLS and distortion. */
379+
* the fixed height causes distortion. height: auto lets the
380+
* browser recompute height proportionally once the image loads.
381+
* Note: this does not reserve space before load — images without
382+
* explicit HTML width/height attributes will cause layout shift. */
383383
article img[loading="lazy"] {
384384
height: auto !important;
385385
}

0 commit comments

Comments
 (0)