Created attachment 11670 [details] book with <pre> element Tor, I have tried latest mupdf latest commit from http://git.ghostscript.com/?p=user/tor/mupdf.git (which implements the white-space property). The attached ePub document shows a bug with no space after the <pre> element. This is caused by the fact that <pre> inherits values from <p>. Being both block elements, I’m afraid this is wrong. They may have a common ancestor, but none of these elements can contain the other. This is why I’m afraid there is a bug here. <pre> shouldn’t inherit values from <p>. Many thanks for your help and your excellent work, Pablo
Created attachment 11673 [details] ePub that shows wrong <pre> inheritance The attached image shows the display from mupdf-x11 on the left and the display from ebook-viewer (calibre) on the right.
The missing space has nothing to do with inheritance -- it's the default 'margin' property of <pre> elements being set to 0 (as per the CSS defaults given in http://www.w3.org/TR/CSS2/sample.html). Your stylesheet sets the <p> top-margin to 0 as well, hence no margin between the <pre> and following <p> elements.
(In reply to Tor Andersson from comment #2) > The missing space has nothing to do with inheritance -- it's the default > 'margin' property of <pre> elements being set to 0 (as per the CSS defaults > given in http://www.w3.org/TR/CSS2/sample.html). Your stylesheet sets the > <p> top-margin to 0 as well, hence no margin between the <pre> and following > <p> elements. You’re right, Tor. Wrong report. It could be closed as invalid (sorry, but I shouldn’t close my own reports).
Improved the default CSS styles to be more similar to web browsers.