
On 2/17/2012 4:49 PM, James Adcock wrote:
Is "white-space pre" usable?
<pre> implies the use of an ugly courier-like fixed pitch “monospace” font.
Again, two different conversations. <pre> is an HTML tag. According to the specification, <blockquote> The PRE element tells visual user agents that the enclosed text is "preformatted". When handling preformatted text, visual user agents: * May leave white space intact. * May render text with a fixed-pitch font. * May disable automatic word wrap. ... [It] is intended to preserve constant line spacing and column alignment for text rendered in a fixed pitch font. Authors are discouraged from altering this behavior through style sheets. </blockquote> I find it interesting that the W3C uses the word "may" in the specification as opposed to "should" or "must." I'm not aware of any user agent that violates this expectations, but the wording is nonetheless interesting. -------------- 'white-space' is a CSS property. The 'pre' value, "prevents user agents from collapsing sequences of white space. Lines are only broken at preserved newline characters." Text marked with 'white-space:pre' will not have multiple runs of spaces collapsed, which allows multiple levels of indentation at the beginning of lines, and will not wrap text except where there is an explicit newline character (0x10). 'white-space:pre' has no implication as to font face or pitch. Furthermore, I suspect that it would have no impact at all on the "Klassic Kindle," as .mobi does not have /any/ support for style sheets, and I'm not certain how KindleGen would transform it into HTML 3.2.