From 1aa66cc931b2b4e996d43c5155c7a0ec5efe033e Mon Sep 17 00:00:00 2001 From: Baha Date: Mon, 11 Sep 2017 14:16:44 -0400 Subject: [PATCH] Print styles: set minimum width for paragraphs An arbitrary 120pt (approved by the designer) has been chosen as the minimum width of paragraphs. This is especially useful when a paragraph is surrounded by two floating elements from the left and right. If there is not enough space in the middle, then the change will push the paragraph text until there's enough space to display the text. Bug: T175008 Change-Id: I428f153309162e23606e5187a0e1bd7244253f10 --- print.less | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/print.less b/print.less index bdf5e86..6dafb44 100644 --- a/print.less +++ b/print.less @@ -122,6 +122,21 @@ line-height: 16pt; margin-top: 5px; text-align: justify; + + // T175008 + // When a paragraph is surrounded by floating elements from both + // sides, we want to make sure that there is at least some space + // before showing the text. Otherwise, small lengths of text may show + // between the surrounding elements, making the reading experience less + // enjoyable. If there is not enough space the following code will push + // the paragraph contents until after the floating element(s). + @paragraphMinWidth: 120pt; + &:before { + content: ''; + display: block; + overflow: hidden; + width: @paragraphMinWidth; + } } blockquote {