Closed asylumcs closed 1 year ago
The letter-spacing CSS attribute is allowed by PG. We could add every possible attribute to every styled element in the generated text, or we could ask the PP not to do that.
As it's likely that the generated text will be redesigned in Ebookmaker v0.13 (see discussion here: #139 ) We won't address this in v0.12.
Perhaps consider adding "all: initial" to tags used in the header and footer to assure that user's CSS does not get applied to header/footer elements.
strange. the HTML5 validator doesn't like it: error: CSS: “all”: Property “all” doesn't exist.
Whoops. Now that it's posted, I see I was logged in as Nell, not myself. --Roger
can confirm it validates with the current nu validator. (23.1.8) I was hoping this would be easy, but maybe I need to fix my nu validator and maybe update others.
production has 20.6.30 I have 20.6.30 online ebookmaker has 23.1.11
As part of the header refactor, all: initial
has been added to a number of styles in the header stylesheet - see ebookmaker.writers.HTMLTemplates I found that it was too big a hammer to use on everything, so it's still possible for the user's stylesheet to modify the header styling, but the use of #pg-header in the selector should minimize inadvertent style leakage.
Reference two files on the landing page for etext 69058, the as submitted HTML and the generated HTML5. The generated HTML5 replaces the as-submitted tag with an
<h2>
but it inadequately protects the<h2>
tag from the post-processor's CSS. An inline "style=" is used to partially protect from user's CSS but it is incomplete. It lacks assuring the default values (see this page for h2's defaults). Even that would be inadequate for this etext, since the post-processor has styled the h2 with aletter-spacing
attribute, which is not in the W3C list. To close this issue, it seems that the h2 generated by the HTML5 conversion code must be hardened against user styling all h2's in CSS.