ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
64 stars 38 forks source link

Remove style attributes on elements #666

Open ietf-svn-bot opened 3 years ago

ietf-svn-bot commented 3 years ago

type_defect | by mt@lowentropy.net


The HTML generator adds style="margin-left: 1.5em" to virtually all <dd> elements. This is not appropriate. Margin sizes are the domain of stylesheets. The explicit style rule on the element overrides the stylesheet and is impossible to manage with anything other than !important rules (which are best avoided).

I realize that there are explicit instructions in the XML for setting the left margin on elements in definition lists. But those are for text rendering.

It might be OK to use CSS classes for this, even if this means some awkwardness. For instance: <dt class="compact indentN"> might be OK for arbitrary values of N. Stylesheets could then style that according to their constraints.

(Note that I suggest here putting the attribute on the <dt> and not the <dd>: this is a per-list construct in the source XML.)


Issue migrated from trac:666 at 2022-02-08 07:16:57 +0000

martinthomson commented 2 years ago

I have some newer suggestions in #856.