From 24a87508c6c1831c5ccd078cabac2c77e991d10f Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Thu, 12 Feb 2026 23:41:57 +0800 Subject: [PATCH] fix(layout): respect image dimension attribute, closes #3274 (#3277) --- apps/readest-app/src/utils/style.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/readest-app/src/utils/style.ts b/apps/readest-app/src/utils/style.ts index 5159a3f3..7d3588ed 100644 --- a/apps/readest-app/src/utils/style.ts +++ b/apps/readest-app/src/utils/style.ts @@ -259,10 +259,14 @@ const getLayoutStyles = ( zoom: ${zoomLevel}; } svg, img { - height: auto; - width: auto; background-color: transparent !important; } + svg:where(:not([width])), img:where(:not([width])) { + width: auto; + } + svg:where(:not([height])), img:where(:not([height])) { + height: auto; + } figure > div:has(img) { height: auto !important; }