typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

css float: now longer left-wraps/right-wraps text

Open baardev opened this issue 3 years ago • 2 comments

  • [x] Searched existing issues to avoid creating duplicates.

  • [x] Confirmed that it can be reproduced in built-in themes without customized CSS. confirmed with all built-in themes

  • [x] Searched http://support.typora.io/


An image that is in a <IMG> tag with the style "float:right", is right-justified, but if that image is on the first line of a paragraph, it appears ABOVE the text as opposed to left-wrapping around the image. This is new with the latest version (1.4.4). This bug does not appear when exporting to PDF.

To reproduce, create MD file: <img src='someimg.png' style='float:right;width:30%'/>test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text test text

Running on: Kernel: 5.19.9-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 Desktop: KDE Plasma v: 5.25.5 Distro: Manjaro Linux base: Arch Linux

Screenshot_20220918_192429

The same is true for right-wrapping text on left-floated images. float-left-bug

baardev avatar Sep 20 '22 20:09 baardev

There is an additional bug in the CSS formatting. Regardless of the width set in the style, the image is getting reduced to about 5%.

The image attached is from the following code:


The quantitative values are the same in both equations, but the qualitative values are radically different.

<img src='../Images/tcurve.png' style='float:right;width:20%'/>In applying formula b) we begin with 4÷family-size for the first tholon, so we have 4÷1, or simply 4. The next value, with a family-size of 3, would then be 4÷3, or 1.333, the next family-size of 5 is then


Screenshot_20220925_021921

baardev avatar Sep 25 '22 05:09 baardev

the image is getting reduced to about 5%.

There are now transparent border before and after images for editing purpose.

abnerlee avatar Sep 25 '22 14:09 abnerlee

Can you elaborate on this a bit, please? It is unclear what transparent borders have to do with broken floats or image shrinkage. I also don't see any additional borders in images added with tags or with MD. How big are these borders? Can they be disabled in CSS? Is that what is breaking the float functionality? Does this mean that any docs with images that were made before this change will now be affected by this change? Are you saying that the float issue is not a bug?

tholonia avatar Oct 01 '22 22:10 tholonia

It is unclear what transparent borders have to do with broken floats or image shrinkage.

It should not broken floats, we will fix the float issue. It is a very small border which would cause setting width of image not 100% accurate.

abnerlee avatar Nov 24 '22 08:11 abnerlee

fixed in v1.5.x

abnerlee avatar Feb 14 '23 04:02 abnerlee