OpenNews/opennews-source

headline wrapping issue with random promo in search pane

ryanpitts opened this issue · 4 comments

Hi @beep, I just implemented the random article promo and ran into this:

screen shot 2017-01-31 at 5 11 53 pm

beep commented

Oh, ha—thanks, Ryan. I’ll take a look at that.

(Is there a non-breaking space in that headline, btw?)

beep commented

Here’s what I’d recommend!

  • I’d planned for a smaller/shorter thumbnail in there, so I’d suggest we cap the height of those images in the CSS.
  • I’ll bump the type size down a bit at our widest breakpoint.

screen shot 2017-02-01 at 9 41 21 am

Now! If those titles do have  s in ’em, some weird line breaks might still occur. But! In browsers that support it, we can add a little auto-hyphenation:

screen shot 2017-02-01 at 9 42 45 am

Not every browser/device’ll support it, but for those that do, it’ll clean up the heds a bit.

Let me know what you think. If that all sounds good to you, merge #63 at your leisure!

(Is there a non-breaking space in that headline, btw?)

@beep ohhhhh, I hadn't connected this, but yes I'm passing headlines (and display text in a number of places) through a filter called typogrify that fixes quote marks and a few other nice things ... including adding an nbsp between the last two words to avoid widows.

In other places I'm just passing text through smartypants, which avoids the widow-busting. I'll swap that in here to be safe as well.

@beep also, is there a target size I should thumbnail those images to? I can do whatever.