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

Bug#772963: release-notes: cellphone friendly CSS



On 2015-01-24 18:27, Stéphane Blondon wrote:
> 2015-01-21 17:48 GMT+01:00 Niels Thykier <niels@thykier.net>:
>> [...]
>>
>> It was a Nokia Lumia Windows phone.  I assume that means it was an
>> internet explorer.  Regardless, I reproduced it in Iceweasel's developer
>> mode (see attached screenshot) using the (predefined) 320x480 window mode.
> 
> Thanks, I understand the problem. However it's not easy to fix. There
> are unbreakable spaces in the name ('Chapter 1. xxx'), that's why the
> footer expands. It's the same problem in the current version of the
> footer and is not due to the new css. For example, see with a little
> screen :
> https://www.debian.org/releases/stable/amd64/ch01s06.html
> 
> I don't think it's easy to fix without changing HTML. I will ask to a
> web designer at work monday but I'm pessimistic.
> 

Ok, let me know what he/she said.

> 
>> [...]
> 
>>>>  * The "Caution" remarks (plus "note" etc.) has a so much margin that
>>>>    only 16-20 characters are shown per line[2].  In desktop mode it
>>>>    only takes 1-2 lines.
> 
> It's not really easy to fix because there is css style directly in the page:
> <div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
> 
> Like the footer, this margin create the same problem on little screen
> for the current documentation (Debian 7.0).
> The clean way to do it is to remove the style attribute and to it in
> the css file. Do you think it's easy to do?
> 
> If not changing it, the rendering is the same with or without the css
> on little screen: plenty lines.
> 
> If you can remove the stylee attribute, I will work on improving the
> caution block.
> 

Turns out it is fair simple to do, but it kills *all* inline styles[1].
 Simply apply attached patch and rebuild.  All inline styles should now
be gone (for better and for worse).  We might need to extract the
existing styles to keep the current look and feel.

> 
> I'm ready to improve other points if needed.
> 

Excellent, thanks.

~Niels

[1] Well, except the "body" used for displaying the draft image - but we
have an existing work-around for that.


diff --git a/html.xsl b/html.xsl
index 5cc4f74..b11ca41 100644
--- a/html.xsl
+++ b/html.xsl
@@ -10,6 +10,8 @@
   <xsl:param name="section.autolabel">1</xsl:param>
   <xsl:param name="section.label.includes.component.label">1</xsl:param>
   <xsl:param name="use.id.as.filename">1</xsl:param>
+  <xsl:param name="css.decoration">0</xsl:param>
+  <xsl:param name="admon.style" />
 
   <xsl:template name="user.head.content">
     <meta name="viewport" content="width=device-width, initial-scale=1" />

Reply to: