Page MenuHomePhabricator

Floating images in Phriction can make everything else afterwards float... forever
Closed, ResolvedPublic

Assigned To
Authored By
swisspol
Jan 9 2016, 8:38 PM
Referenced Files
F1058060: sockshibe.jpg
Jan 9 2016, 11:49 PM
F1058053: pasted_file
Jan 9 2016, 11:43 PM
F1057989: Screen Shot 2016-01-09 at 1.46.17 PM.png
Jan 9 2016, 9:58 PM
F1057980: sockshibe.jpg
Jan 9 2016, 9:51 PM
F1057939: pasted_file
Jan 9 2016, 8:38 PM

Description

This markup:

{F60 width=160, float} {F62 width=160, float} {F63 width=160, float}

{F66 size=full}


---

==Test

Incorrectly renders as:

pasted_file (329×811 px, 29 KB)

Event Timeline

Is there any markup command to "clear the float"?

Need a way to clear a float e.g. "clear:both"

My expectation would be this floats forever given current syntax. The only solution I can think of is a new Remarkup rule for clearing, which you can place anywhere down the line, which is what it sounds like you're suggesting.

Can you place them in a table in the meantime?

Yep, table works, thanks for the idea!

Yeah. I think:

  • This element should be laid out with layout=inline, not float. You aren't trying to float the images around other content. Float is for layouts like this:

Screen Shot 2016-01-09 at 1.46.17 PM.png (889×1 px, 321 KB)

  • At HEAD, there is a bug with layout=inline and width or height, which makes the image not layout inline.
  • D14983 fixes this bug.

I do think we could reasonably put clear: both on hr and probably headers. I think it used to run into some problems with tables of contents, but we never (I think?) put them inline anymore (maybe in readmes in Diffusion?) so we should be in the clear, now.

But I think the fix to the root problem here is basically "use inline, not float".

@epriestley Are you sure inline works?

{F60 width=160, layout=inline}  {F60 width=160, layout=inline} {F60 width=160, layout=inline}

Renders as:

pasted_file (644×204 px, 15 KB)

PS: We are on the hyper instance on Phacility.

Doing a bit more digging here... layout=inline doesn't work if coupled with size=xx.

Just trying to have it all :-)

D14983 fixes the interaction between inline and width. I'll push it to this server and wipe the cache now, and the comment above should start working.

(This will hit Phacility SAAS in about a week.)

Oh, the comment was a screenshot. Inline + width should work on this host now.

sockshibe.jpg (606×500 px, 43 KB) sockshibe.jpg (606×500 px, 43 KB) sockshibe.jpg (606×500 px, 43 KB)

In T10110#152970, @chad wrote:

maybe just hr and h2

Do you have a case in mind where not clearing h1 (or h3 .. h6, for that matter) is useful offhand?

The most interesting thing I can come up with is that you might want to do this, maybe:

BIG HEADER    XXXX
------------  XXXX
xt text text  XXXX
text text te
text text text text
text.

But that seems like it's probably OK as this, instead, with the header clearing both?

BIG HEADER
------------------    
text text te  XXXX
xt text text  XXXX
text text te  XXXX
text text te
xt text text text.

I'll clear hr in the meantime, I think that's unambiguous.

I think h2 is the largest remarkup header? I've never seen an h1 in use.

Oh! Well that would make perfect sense, then. I'll update D14984 to just clear all the headers that remarkup can emit.

epriestley claimed this task.

At HEAD:

  • layout=inline no longer conflicts with width or height.
  • <hr /> (i.e., ---) now has clear: both.

These changes will likely be pushed to the Phacility cluster next Saturday morning (January 16).

Great, thanks much for the incredible responsiveness 😄

Please add the triple dash to the documentation page, I couldn't find it clicking on the main life-saver icon link.