mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Decl styling, consistent monospace
This commit is contained in:
parent
98800be904
commit
b0a2e5cf04
2
CHANGES
2
CHANGES
@ -16,6 +16,8 @@ Deprecated
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* #9023: More CSS classes on domain descriptions, see :ref:`nodes` for details.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
|
@ -510,6 +510,10 @@ table.hlist td {
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
@ -534,8 +538,8 @@ table.hlist td {
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.cpp-expr {
|
||||
font-family: monospace;
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,16 +127,16 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
|
||||
##############################################
|
||||
|
||||
def visit_desc_name(self, node: Element) -> None:
|
||||
self.body.append(self.starttag(node, 'code', ''))
|
||||
self.body.append(self.starttag(node, 'span', ''))
|
||||
|
||||
def depart_desc_name(self, node: Element) -> None:
|
||||
self.body.append('</code>')
|
||||
self.body.append('</span>')
|
||||
|
||||
def visit_desc_addname(self, node: Element) -> None:
|
||||
self.body.append(self.starttag(node, 'code', ''))
|
||||
self.body.append(self.starttag(node, 'span', ''))
|
||||
|
||||
def depart_desc_addname(self, node: Element) -> None:
|
||||
self.body.append('</code>')
|
||||
self.body.append('</span>')
|
||||
|
||||
def visit_desc_type(self, node: Element) -> None:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user