Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2013 17:08:03 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        doc@FreeBSD.org
Subject:   screen elements and userinput in XHTML
Message-ID:  <alpine.BSF.2.00.1307231653010.61273@wonkity.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
In XHTML documents, our current CSS stylesheet does not distinguish 
between user-typed input and system output.  That's my fault, Gabor had 
user input in bold but I felt it had so much contrast that it distracted 
rather than clarified.  Our screen elements are not separated from other 
text, either.

The current programlisting elements are better, in a box with a gray 
background.  We could make screen elements identical, but there is some 
value to the reader in making them look different.

I checked various web documentation pages for other projects, and most 
did not distinguish between system output and user input.  In some 
cases, that is likely to prompt a user to type a prompt.  The 
best-looking example I found was some Slackware documentation, which 
uses plain text for system output and bold for user input, but put it on 
a gray background which helped tone down the contrast.

Putting this all together, I've been trying this experimental addition 
to doc/share/misc/docbook.css.  It makes the userinput bold, draws a box 
around screen elements, but uses a sort of medium tan background so it 
does not look like a programlisting.

The color is questionable, and there may be a better choice.  Lighter 
colors seemed too bright.  But I do find this easier to read.

Comments welcome.


Index: docbook.css
===================================================================
--- docbook.css	(revision 42404)
+++ docbook.css	(working copy)
@@ -240,6 +240,10 @@
  	white-space: pre;
  	font-family: monospace;
  	padding: 1ex;
+	background-color: #ec8;
+	border: 1px solid #ccc;
+	border-radius: 6px;
+	line-height: 1.1;
  }

  div.programlisting {
@@ -340,7 +344,7 @@
  }

  .userinput {
-	font-weight: normal;
+	font-weight: bold;
  }

  pre.screen strong {
[-- Attachment #2 --]
Index: docbook.css
===================================================================
--- docbook.css	(revision 42404)
+++ docbook.css	(working copy)
@@ -240,6 +240,10 @@
 	white-space: pre;
 	font-family: monospace;
 	padding: 1ex;
+	background-color: #ec8;
+	border: 1px solid #ccc;
+	border-radius: 6px;
+	line-height: 1.1;
 }
 
 div.programlisting {
@@ -340,7 +344,7 @@
 }
 
 .userinput {
-	font-weight: normal;
+	font-weight: bold;
 }
 
 pre.screen strong {
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1307231653010.61273>