Переглянути джерело

fix: `<img>` aspect ratio w/ `height: auto`

Complement with `max-width: 100%` with a `height: auto` to preserve `<img>` aspect ratios, particularly when it's not wrapped in a block parent e.g. `<p>` or `<figure>` most commonly.

Related: https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again/
Paul Esch-Laurent 1 рік тому
батько
коміт
2fbe2df086
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      internal/ui/static/css/common.css

+ 4 - 0
internal/ui/static/css/common.css

@@ -1038,6 +1038,10 @@ article.category-has-unread {
     max-width: 100%;
     max-width: 100%;
 }
 }
 
 
+.entry-content img {
+    height: auto;
+}
+
 .entry-content figure {
 .entry-content figure {
     margin-top: 15px;
     margin-top: 15px;
     margin-bottom: 15px;
     margin-bottom: 15px;