help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On markdown images


From: Emanuel Berg
Subject: Re: On markdown images
Date: Sun, 02 May 2021 21:30:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Yuri Khan wrote:

> Width and height attributes, when their values are correct,
> do help the browser lay out the page. It can reserve a known
> space before the image gets downloaded and go on processing
> the rest of the page.
>
> When width and height are missing, the browser does not know
> how much space to reserve, so, when it finally receives the
> image and finds out its dimensions, it has to go back and
> re-layout everything from the point of the image.
>
> Explicit width and height attributes are not the only way to
> mitigate this. For example, one could specify image
> dimensions in CSS. Or just redefine some images to be block
> elements and fit 100% of their container width.

That so?

I have the width here:

  .images_right {
      float:            right;
      padding-top:      6px;
      width:            206px;
  } # [1]

But the height vary from image to image, should I put it
"explicitly" as attributes in the HTML [2] then?

That doesn't feel right because isn't the point of HTML/CSS to
have all that in CSS?

OTOH to have one CSS class for every image feels ... lame.
And a lot of typing.

[1] https://dataswamp.org/~incal/index.css
[2] https://dataswamp.org/~incal/index.html

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]