[libvirt] [PATCH 0/2 v2] Colorize HTML documentation

The only difference to v1 is that I fixed the CSS pseudo elements adding some vital whitespaces. (I tried to be extra smart and removed some whitespace without further testing, just to discover that it did not work anymore *after* sending the patcheset). Claudio Bley (2): docs: Assign classes to documentation elements docs: Add some style and color to the HTML documentation docs/generic.css | 4 ++ docs/libvirt.css | 56 +++++++++++++++- docs/newapi.xsl | 187 +++++++++++++++++++++++++++++++----------------------- 3 files changed, 166 insertions(+), 81 deletions(-) -- 1.7.9.5

In CSS the following class names are available: * keyword (keywords like "typedef", "struct") * type (types like "int", "void*") * comment (comments after members of enums or structs) * directive (preprocessor directives, #define) * undisclosed (text saying that the API is not public) Additionally, kill all of the left-over "programlisting" class assignments. There are no CSS rules for them. Signed-off-by: Claudio Bley <cbley@av-test.de> --- docs/newapi.xsl | 187 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 79 deletions(-) diff --git a/docs/newapi.xsl b/docs/newapi.xsl index 24831ee..3982f8f 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -116,16 +116,18 @@ </xsl:template> <xsl:template match="macro" mode="toc"> - <xsl:text>#define </xsl:text> + <span class="directive">#define</span><xsl:text> </xsl:text> <a href="#{@name}"><xsl:value-of select="@name"/></a> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="variable" mode="toc"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="string(@type)"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="string(@type)"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <a name="{@name}"></a> <xsl:value-of select="@name"/> @@ -134,18 +136,21 @@ </xsl:template> <xsl:template match="typedef" mode="toc"> - <xsl:text>typedef </xsl:text><xsl:variable name="name" select="string(@name)"/> + <span class="keyword">typedef</span> + <xsl:text> </xsl:text><xsl:variable name="name" select="string(@name)"/> <xsl:choose> <xsl:when test="@type = 'enum'"> - <xsl:text>enum </xsl:text> + <span class="keyword">enum</span><xsl:text> </xsl:text> <a href="#{$name}"><xsl:value-of select="$name"/></a> <xsl:text> </xsl:text> </xsl:when> <xsl:otherwise> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <a name="{$name}"><xsl:value-of select="$name"/></a> <xsl:text> @@ -159,7 +164,7 @@ <h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3> <div class="api"> <pre> - <xsl:text>enum </xsl:text> + <span class="keyword">enum</span><xsl:text> </xsl:text> <xsl:value-of select="$name"/> <xsl:text> { </xsl:text> @@ -173,10 +178,11 @@ <td><xsl:value-of select="@value"/></td> <xsl:if test="@info != ''"> <td> - <xsl:text> : </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@info"/> - </xsl:call-template> + <div class="comment"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </div> </td> </xsl:if> </tr> @@ -190,8 +196,8 @@ </xsl:template> <xsl:template match="struct" mode="toc"> - <xsl:text>typedef </xsl:text> - <xsl:value-of select="@type"/> + <span class="keyword">typedef</span><xsl:text> </xsl:text> + <span class="type"><xsl:value-of select="@type"/></span> <xsl:text> </xsl:text> <a href="#{@name}"><xsl:value-of select="@name"/></a> <xsl:text> @@ -202,32 +208,35 @@ <h3><a name="{@name}"><code><xsl:value-of select="@name"/></code></a></h3> <div class="api"> <pre> - <xsl:text>struct </xsl:text> + <span class="keyword">struct </span> <xsl:value-of select="@name"/> - <xsl:text>{ + <xsl:text> { </xsl:text> </pre> <table> <xsl:for-each select="field"> <xsl:choose> <xsl:when test='@type = "union"'> - <tr><td>union {</td></tr> + <tr><td><span class="keyword">union</span> {</td></tr> <tr> <td><table> <xsl:for-each select="union/field"> <tr> <td> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> </td> <td><xsl:value-of select="@name"/></td> <xsl:if test="@info != ''"> <td> - <xsl:text> : </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@info"/> - </xsl:call-template> + <div class="comment"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </div> </td> </xsl:if> </tr> @@ -238,10 +247,11 @@ <td><xsl:value-of select="@name"/></td> <xsl:if test="@info != ''"> <td> - <xsl:text> : </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@info"/> - </xsl:call-template> + <div class="comment"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </div> </td> </xsl:if> <td></td></tr> @@ -249,17 +259,20 @@ <xsl:otherwise> <tr> <td> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> </td> <td><xsl:value-of select="@name"/></td> <xsl:if test="@info != ''"> <td> - <xsl:text> : </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@info"/> - </xsl:call-template> + <div class="comment"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@info"/> + </xsl:call-template> + </div> </td> </xsl:if> </tr> @@ -269,7 +282,7 @@ <xsl:if test="not(field)"> <tr> <td colspan="3"> - <xsl:text>The content of this structure is not made public by the API</xsl:text> + <span class="undisclosed">The content of this structure is not made public by the API</span> </td> </tr> </xsl:if> @@ -285,7 +298,7 @@ <xsl:template match="macro"> <xsl:variable name="name" select="string(@name)"/> <h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3> - <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre> + <pre class="api"><span class="directive">#define</span><xsl:text> </xsl:text><xsl:value-of select="$name"/></pre> <div> <xsl:call-template name="formattext"> <xsl:with-param name="text" select="info"/> @@ -299,9 +312,11 @@ <xsl:variable name="nlen" select="string-length($name)"/> <xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="return/@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <a href="#{@name}"><xsl:value-of select="@name"/></a> <xsl:if test="$blen - 40 < -8"> @@ -312,12 +327,14 @@ </xsl:if> <xsl:text> (</xsl:text> <xsl:if test="not(arg)"> - <xsl:text>void</xsl:text> + <span class="type">void</span> </xsl:if> <xsl:for-each select="arg"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="position() != last()"> @@ -340,13 +357,15 @@ <xsl:variable name="nlen" select="string-length($name)"/> <xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> - <xsl:text>typedef </xsl:text> + <span class="keyword">typedef</span><xsl:text> </xsl:text> <a href="#{$name}"><xsl:value-of select="$name"/></a> <xsl:text> </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="return/@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <a href="#{$name}"><xsl:value-of select="$name"/></a> <xsl:if test="$blen - 40 < -8"> @@ -357,12 +376,14 @@ </xsl:if> <xsl:text> (</xsl:text> <xsl:if test="not(arg)"> - <xsl:text>void</xsl:text> + <span class="type">void</span> </xsl:if> <xsl:for-each select="arg"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="position() != last()"> @@ -388,11 +409,13 @@ <xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> <h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3> - <pre class="programlisting"> - <xsl:text>typedef </xsl:text> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="return/@type"/> - </xsl:call-template> + <pre class="api"> + <span class="keyword">typedef</span><xsl:text> </xsl:text> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + </span> <xsl:text> (*</xsl:text> <xsl:value-of select="@name"/> <xsl:if test="$blen - 40 < -8"> @@ -403,16 +426,19 @@ </xsl:if> <xsl:text>) (</xsl:text> <xsl:if test="not(arg)"> - <xsl:text>void</xsl:text> + <span class="type">void</span> </xsl:if> <xsl:for-each select="arg"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="position() != last()"> - <xsl:text>, </xsl:text><br/> + <xsl:text>, +</xsl:text> <xsl:if test="$blen - 40 > 8"> <xsl:text> </xsl:text> </xsl:if> @@ -465,10 +491,12 @@ <xsl:variable name="tlen" select="string-length(return/@type)"/> <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/> <h3><a name="{$name}"><code><xsl:value-of select="$name"/></code></a></h3> - <pre class="programlisting"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="return/@type"/> - </xsl:call-template> + <pre class="api"> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="return/@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="$blen - 40 < -8"> @@ -479,16 +507,19 @@ </xsl:if> <xsl:text> (</xsl:text> <xsl:if test="not(arg)"> - <xsl:text>void</xsl:text> + <span class="type">void</span> </xsl:if> <xsl:for-each select="arg"> - <xsl:call-template name="dumptext"> - <xsl:with-param name="text" select="@type"/> - </xsl:call-template> + <span class="type"> + <xsl:call-template name="dumptext"> + <xsl:with-param name="text" select="@type"/> + </xsl:call-template> + </span> <xsl:text> </xsl:text> <xsl:value-of select="@name"/> <xsl:if test="position() != last()"> - <xsl:text>, </xsl:text><br/> + <xsl:text>, +</xsl:text> <xsl:if test="$blen - 40 > 8"> <xsl:text> </xsl:text> </xsl:if> @@ -498,9 +529,7 @@ <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> - <xsl:text>)</xsl:text><br/> - <xsl:text> -</xsl:text> + <xsl:text>)</xsl:text> </pre> <div> <xsl:call-template name="formattext"> @@ -579,20 +608,20 @@ <h2>Table of Contents</h2> <xsl:if test="count(exports[@type='macro']) > 0"> <h3><a href="#macros">Macros</a></h3> - <pre> + <pre class="api"> <xsl:apply-templates select="exports[@type='macro']" mode="toc"> <xsl:sort select='@symbol'/> </xsl:apply-templates> </pre> </xsl:if> <h3><a href="#types">Types</a></h3> - <pre> + <pre class="api"> <xsl:apply-templates select="exports[@type='typedef']" mode="toc"> <xsl:sort select='@symbol'/> </xsl:apply-templates> </pre> <h3><a href="#functions">Functions</a></h3> - <pre> + <pre class="api"> <xsl:apply-templates select="exports[@type='function']" mode="toc"> <xsl:sort select='@symbol'/> </xsl:apply-templates> -- 1.7.9.5

Signed-off-by: Claudio Bley <cbley@av-test.de> --- docs/generic.css | 4 ++++ docs/libvirt.css | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/docs/generic.css b/docs/generic.css index dbf7b56..1def6bf 100644 --- a/docs/generic.css +++ b/docs/generic.css @@ -73,3 +73,7 @@ dl dd { margin-right: 2em; margin-bottom: 0.5em; } + +tt, pre { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; +} diff --git a/docs/libvirt.css b/docs/libvirt.css index 5123ed6..2bd9f8f 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -184,23 +184,25 @@ div.api { border: 1px solid #999999; background: #eeeeee; color: black; + padding: 3px; } div.api pre { margin: 0px; border: 0px; background: inherit; + padding: inherit; } div.api table { margin: 0px; padding-left: 2em; - font-family: fixed; - whitespace: pre; + border-spacing: 0px; } div.api table td, div.variablelist table td { vertical-align: top; + padding-left: 1em; } @@ -412,3 +414,53 @@ table.data tbody td.n { background: rgb(255,220,220); text-align: center; } + +.api { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; + line-height: 175%; +} + +.api .type { + font-weight: bold; + white-space: nowrap; + color: darkslateblue; +} + +.api .keyword { + font-weight: bold; + color: #A2F; +} + +.api .comment { + color: #080; + margin-left: 2em; + position: relative; +} + +.api .comment:before { + content: ": "; + position: absolute; + left: -1.3em; +} + +.api .undisclosed { + font-style: italic; + letter-spacing: .3ex; + font-weight: bolder; + text-transform: uppercase; +} + +.api .directive { + color: teal; +} + +.api :link:hover, .api :link:focus { + color: blue; + border-color: blue; +} + +.api :link { + text-decoration: none; + padding-bottom: 2px; + border-bottom: 1px dashed grey; +} -- 1.7.9.5

On Wed, Jan 09, 2013 at 15:40:08 +0100, Claudio Bley wrote:
Signed-off-by: Claudio Bley <cbley@av-test.de> --- docs/generic.css | 4 ++++ docs/libvirt.css | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-)
Overall it looks quite well except for few issues...
diff --git a/docs/generic.css b/docs/generic.css index dbf7b56..1def6bf 100644 --- a/docs/generic.css +++ b/docs/generic.css @@ -73,3 +73,7 @@ dl dd { margin-right: 2em; margin-bottom: 0.5em; } + +tt, pre { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; +}
Do not do this. Default font-family for tt/pre is just good enough. If you don't like it, change your desktop/browser settings.
diff --git a/docs/libvirt.css b/docs/libvirt.css index 5123ed6..2bd9f8f 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -184,23 +184,25 @@ div.api { border: 1px solid #999999; background: #eeeeee; color: black; + padding: 3px; }
div.api pre { margin: 0px; border: 0px; background: inherit; + padding: inherit; }
div.api table { margin: 0px; padding-left: 2em; - font-family: fixed; - whitespace: pre; + border-spacing: 0px; }
div.api table td, div.variablelist table td { vertical-align: top; + padding-left: 1em; }
@@ -412,3 +414,53 @@ table.data tbody td.n { background: rgb(255,220,220); text-align: center; } + +.api { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; + line-height: 175%; +}
Just font-family: monospace; without other families and without the huge line-height which makes reading hard.
+ +.api .type { + font-weight: bold; + white-space: nowrap; + color: darkslateblue; +} + +.api .keyword { + font-weight: bold; + color: #A2F; +} + +.api .comment { + color: #080; + margin-left: 2em; + position: relative; +} + +.api .comment:before { + content: ": "; + position: absolute; + left: -1.3em; +} + +.api .undisclosed { + font-style: italic; + letter-spacing: .3ex; + font-weight: bolder; + text-transform: uppercase; +} + +.api .directive { + color: teal; +} + +.api :link:hover, .api :link:focus { + color: blue; + border-color: blue; +} + +.api :link { + text-decoration: none; + padding-bottom: 2px; + border-bottom: 1px dashed grey; +}
Leaving just text-decoration: none; would be best. However, if you think links need to be more visually distinguished, removing this whole .api :link style is more more readable then adding dashed underlining far below the text. Jirka

At Thu, 10 Jan 2013 13:58:28 +0100, Jiri Denemark wrote:
On Wed, Jan 09, 2013 at 15:40:08 +0100, Claudio Bley wrote:
Signed-off-by: Claudio Bley <cbley@av-test.de> --- docs/generic.css | 4 ++++ docs/libvirt.css | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-)
Overall it looks quite well except for few issues...
diff --git a/docs/generic.css b/docs/generic.css index dbf7b56..1def6bf 100644 --- a/docs/generic.css +++ b/docs/generic.css @@ -73,3 +73,7 @@ dl dd { margin-right: 2em; margin-bottom: 0.5em; } + +tt, pre { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; +}
Do not do this. Default font-family for tt/pre is just good enough. If you don't like it, change your desktop/browser settings.
I beg to differ. I tried 4 Browsers on 2 OSes, and it looked bad to me in all of them using the default user agent settings. IMO, the 80% font-size is too small to look any decent using the user agent font settings for tt / pre elements. It's hardly readable! (bad with Firefox on Fedora, worse with Webkit on Windows) But removing the 80% font-size setting looks ugly, too. Any way, if there was only a single browser with bad defaults, wouldn't it make sense trying to fix this for better user experience instead of telling all users to change their settings (on every single system they use)? As this is mainly a matter of taste, other opinions, please! Or better yet, alternative solutions...
+.api { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; + line-height: 175%; +}
Just
font-family: monospace;
without other families and without the huge line-height which makes reading hard.
OK, I'll reduce the line-height. It had to be that large for the underline decoration of links. But see below.
diff --git a/docs/libvirt.css b/docs/libvirt.css index 5123ed6..2bd9f8f 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css +.api :link:hover, .api :link:focus { + color: blue; + border-color: blue; +} + +.api :link { + text-decoration: none; + padding-bottom: 2px; + border-bottom: 1px dashed grey; +}
Leaving just
text-decoration: none;
would be best.
Agreed. Here's a follow-up patch: --- >8 ---- diff --git a/docs/generic.css b/docs/generic.css index 1def6bf..522fda2 100644 --- a/docs/generic.css +++ b/docs/generic.css @@ -4,7 +4,7 @@ body { padding: 0px; color: rgb(0,0,0); font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 80%; + font-size: smaller; background: #ffffff; } diff --git a/docs/libvirt.css b/docs/libvirt.css index 2bd9f8f..a3e3ee1 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -417,7 +417,7 @@ table.data tbody td.n { .api { font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; - line-height: 175%; + line-height: 135%; } .api .type { @@ -461,6 +461,4 @@ table.data tbody td.n { .api :link { text-decoration: none; - padding-bottom: 2px; - border-bottom: 1px dashed grey; }

On Thu, Jan 10, 2013 at 15:49:22 +0100, Claudio Bley wrote:
At Thu, 10 Jan 2013 13:58:28 +0100, Jiri Denemark wrote:
+ +tt, pre { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; +}
Do not do this. Default font-family for tt/pre is just good enough. If you don't like it, change your desktop/browser settings.
I beg to differ. I tried 4 Browsers on 2 OSes, and it looked bad to me in all of them using the default user agent settings.
IMO, the 80% font-size is too small to look any decent using the user agent font settings for tt / pre elements. It's hardly readable! (bad with Firefox on Fedora, worse with Webkit on Windows)
The problem is that it's all totally subjective. For me the default is just fine and it looks ugly with your style (and luckily I don't have Ubuntu Monospace so that it is not as bad as it could be). The important thing is that the default can be easily overridden while your proposed change can be hardly overridden. One would either need to provide it's own CSS style and force the browser to use it (which usually makes things worse) or tell fontconfig to replace Ubuntu Monospace with something different.
But removing the 80% font-size setting looks ugly, too.
Any way, if there was only a single browser with bad defaults, wouldn't it make sense trying to fix this for better user experience instead of telling all users to change their settings (on every single system they use)?
We haven't received any single complaint about this so I doubt all users need to change anything.
As this is mainly a matter of taste, other opinions, please! Or better yet, alternative solutions...
+.api { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; + line-height: 175%; +}
Just
font-family: monospace;
without other families and without the huge line-height which makes reading hard.
OK, I'll reduce the line-height. It had to be that large for the underline decoration of links. But see below.
I don't think it needs to be changed at all when underline decoration is removed.
Here's a follow-up patch:
It's definitely better than before but I still think we should leave more things at their defaults. Jirka

At Wed, 16 Jan 2013 11:17:29 +0100, Jiri Denemark wrote:
On Thu, Jan 10, 2013 at 15:49:22 +0100, Claudio Bley wrote:
At Thu, 10 Jan 2013 13:58:28 +0100, Jiri Denemark wrote:
+ +tt, pre { + font-family: "Ubuntu Monospace", "Consolas", "Lucida Console", monospace; +}
Do not do this. Default font-family for tt/pre is just good enough. If you don't like it, change your desktop/browser settings.
I beg to differ. I tried 4 Browsers on 2 OSes, and it looked bad to me in all of them using the default user agent settings.
IMO, the 80% font-size is too small to look any decent using the user agent font settings for tt / pre elements. It's hardly readable! (bad with Firefox on Fedora, worse with Webkit on Windows)
The problem is that it's all totally subjective. For me the default is just fine and it looks ugly with your style (and luckily I don't have Ubuntu Monospace so that it is not as bad as it could be). The important thing is that the default can be easily overridden while your proposed change can be hardly overridden. One would either need to provide it's own CSS style and force the browser to use it (which usually makes things worse) or tell fontconfig to replace Ubuntu Monospace with something different.
Instead of arguing about this nuance, I'll propose a new patch shortly. I'm going to remove the font-family setting. But I'll try to fix the tt issue. Let's see would you think.
But removing the 80% font-size setting looks ugly, too.
Any way, if there was only a single browser with bad defaults, wouldn't it make sense trying to fix this for better user experience instead of telling all users to change their settings (on every single system they use)?
We haven't received any single complaint about this so I doubt all users need to change anything.
Nobody complaint about the documentation having no visible breaks, being just a long slew of words clutched together. Even Eric admitted that he wanted that for a long time. Sometimes users are capable of suffering beyond bearing... Maybe we should conduct a poll on the user list?
OK, I'll reduce the line-height. It had to be that large for the underline decoration of links. But see below.
I don't think it needs to be changed at all when underline decoration is removed.
For me, it's easier to read, YMMV.
Here's a follow-up patch:
It's definitely better than before but I still think we should leave more things at their defaults.
I'll try. Claudio -- AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany Phone: +49 341 265 310 19 Web:<http://www.av-test.org> Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076) Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern
participants (2)
-
Claudio Bley
-
Jiri Denemark