doc: css: update code documentation directives style
New Sphinx version (or docutils) has slightly changed the output format for code documentation directives. These changes try to mimic previous behavior, even though it does not achieve 100% equal result. In some cases the new default style does not require further tweaks, and in some others styling as before is not possible. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
37566221ba
commit
f08279901d
1 changed files with 19 additions and 76 deletions
95
doc/_static/css/custom.css
vendored
95
doc/_static/css/custom.css
vendored
|
@ -124,64 +124,27 @@ hr,
|
||||||
border-color: var(--admonition-attention-title-background-color) !important;
|
border-color: var(--admonition-attention-title-background-color) !important;
|
||||||
color: var(--admonition-attention-color) !important;
|
color: var(--admonition-attention-color) !important;
|
||||||
}
|
}
|
||||||
.rst-content dl:not(.docutils).class dt,
|
|
||||||
.rst-content dl:not(.docutils).function dt,
|
.rst-content dt.sig .k {
|
||||||
.rst-content dl:not(.docutils).method dt,
|
color: var(--highlight-keyword2-color) !important;
|
||||||
.rst-content dl:not(.docutils).attribute dt {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils).class > dt,
|
|
||||||
.rst-content dl:not(.docutils).function > dt,
|
|
||||||
.rst-content dl:not(.docutils).method > dt,
|
|
||||||
.rst-content dl:not(.docutils).attribute > dt {
|
|
||||||
font-size: 100% !important;
|
|
||||||
font-weight: normal !important;
|
|
||||||
margin-bottom: 16px !important;
|
|
||||||
padding: 6px 8px !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) tt.descclassname,
|
|
||||||
.rst-content dl:not(.docutils) code.descclassname {
|
|
||||||
color: var(--highlight-type2-color) !important;
|
|
||||||
font-weight: normal !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) tt.descname,
|
|
||||||
.rst-content dl:not(.docutils) code.descname {
|
|
||||||
color: var(--highlight-function-color) !important;
|
|
||||||
font-weight: normal !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) .sig-paren,
|
|
||||||
.rst-content dl:not(.docutils) .optional {
|
|
||||||
color: var(--highlight-operator-color) !important;
|
|
||||||
font-weight: normal !important;
|
|
||||||
padding: 0 2px !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) .optional {
|
|
||||||
font-style: italic !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) .sig-param,
|
|
||||||
.rst-content dl:not(.docutils).class dt > em,
|
|
||||||
.rst-content dl:not(.docutils).function dt > em,
|
|
||||||
.rst-content dl:not(.docutils).method dt > em {
|
|
||||||
color: var(--code-literal-color) !important;
|
|
||||||
font-style: normal !important;
|
font-style: normal !important;
|
||||||
padding: 0 4px !important;
|
|
||||||
}
|
}
|
||||||
.rst-content dl:not(.docutils) .sig-param,
|
|
||||||
.rst-content dl:not(.docutils).class dt > code,
|
.rst-content dt.sig .kt {
|
||||||
.rst-content dl:not(.docutils).function dt > code,
|
|
||||||
.rst-content dl:not(.docutils).method dt > code {
|
|
||||||
padding: 0 4px !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils) .sig-param,
|
|
||||||
.rst-content dl:not(.docutils).class dt > .optional ~ em,
|
|
||||||
.rst-content dl:not(.docutils).function dt > .optional ~ em,
|
|
||||||
.rst-content dl:not(.docutils).method dt > .optional ~ em {
|
|
||||||
color: var(--highlight-number-color) !important;
|
|
||||||
font-style: italic !important;
|
|
||||||
}
|
|
||||||
.rst-content dl:not(.docutils).class dt > em.property {
|
|
||||||
color: var(--highlight-keyword-color) !important;
|
color: var(--highlight-keyword-color) !important;
|
||||||
|
font-style: normal !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rst-content dt.sig .sig-name .n {
|
||||||
|
color: var(--highlight-function-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rst-content dt.sig .k,
|
||||||
|
.rst-content dt.sig .kt,
|
||||||
|
.rst-content dt.sig .n {
|
||||||
|
font-weight: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
.rst-content dl:not(.docutils) dt a.headerlink {
|
.rst-content dl:not(.docutils) dt a.headerlink {
|
||||||
color: var(--link-color) !important;
|
color: var(--link-color) !important;
|
||||||
}
|
}
|
||||||
|
@ -880,16 +843,8 @@ kbd, .kbd {
|
||||||
|
|
||||||
/* Breathe tweaks */
|
/* Breathe tweaks */
|
||||||
|
|
||||||
.rst-content dl.group>dt, .rst-content dl.group>dd>p {
|
.rst-content .section > dl > dd {
|
||||||
display:none !important;
|
margin-left: 0;
|
||||||
}
|
|
||||||
|
|
||||||
.rst-content dl.group {
|
|
||||||
margin: 0 0 1rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rst-content dl.group>dd {
|
|
||||||
margin-left: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rst-content p.breathe-sectiondef-title {
|
.rst-content p.breathe-sectiondef-title {
|
||||||
|
@ -897,24 +852,12 @@ kbd, .kbd {
|
||||||
color: var(--link-color);
|
color: var(--link-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rst-content div.breathe-sectiondef {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rst-content dl:not(.docutils) dl:not(.rst-other-versions) dt {
|
.rst-content dl:not(.docutils) dl:not(.rst-other-versions) dt {
|
||||||
background: var(--admonition-note-background-color) !important;
|
background: var(--admonition-note-background-color) !important;
|
||||||
border-top: none !important;
|
border-top: none !important;
|
||||||
border-left: none !important;
|
border-left: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rst-content dl:not(.docutils).c.var .pre {
|
|
||||||
padding-right: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rst-content dl:not(.docutils).c.struct .property {
|
|
||||||
padding-right: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Misc tweaks */
|
/* Misc tweaks */
|
||||||
|
|
||||||
.rst-columns {
|
.rst-columns {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue