From: Guenter M. <mi...@us...> - 2016-08-13 10:30:14
|
On 2016-08-11, Alan Isaac wrote: > There is a major docutils component to this question, but I also > ask for CSS help. > Default browser styling of a PRE element is something like this:: > display: block; > font-family: monospace; > white-space: pre; > The white-space appears to be interpreted by many browsers as > including any EOL immediately following the tag. :: > <pre> > So this appears to be preceded by an empty line. > </pre> > That seems to be typical handling, although not in Edge. > If I am right, it conflicts with the spec: > https://www.w3.org/TR/html4/appendix/notes.html#notes-line-breaks > Finding a browser error admittedly seems unlikely ... This is the "normal" rule. It conflicts with the definition of ``white-space:pre``: "don't ignore whitespace". Also, the definition for XHTML may differ. > But if I am wrong, it should be possible to style it away. > 1. Is this a browser bug? Unsure, see above. > 2. If not, this behavior can be styled away. How? > And should this "fixed" styling be done by the writer. Not that I know of. Maybe with some exoticly complicated rule... > 3. If styling is not a solution, should PRE elements be written > with content following immediately (rather than with > an initial EOL)? I think so. This is what the "html5" writer does. Günter |