We have a project which produces html from rst files, using Sphinx. Earlier we used Sphinx version 2.1 and after upgrade to version 6.1.3 a sideeffect occurs where our headers defined like this:
:header:
are rendered in our html structure as small headers, just like when we used Sphinx 2.1, but span with class "colon" is injected by Sphinx right after the header. Is there a way to stop Sphinx doing that without resorting to hiding it with CSS?
The syntax
actually starts a field list (in e-mails this would be written:
From: …). The text between the colons becomes the "field name", in HTML it becomes a definition list term<dt>in a specially styled definition list<dl>.From the question, it is not clear whether the use of
:header:is abusing the field list syntax to get a section header (or similar) in intended size or if you indeed want a "field list".For smaller headings, there are alternatives like "rubric" and "topic" directives.
Custom CSS is the recommended way for idividual styling preferences in any case. The trailing colon of a field name was put in a separte span exactly to enable hiding with custom CSS.