Skip to content

Commit 61c2965

Browse files
kartbennashif
authored andcommitted
doc: css: fix styling of signatures
Sync the section of the custom.css dedicated to object signatures with Godot custom CSS. Fixes #80005. Signed-off-by: Benjamin Cabé <[email protected]> (cherry picked from commit c7f1f32)
1 parent 30b0a75 commit 61c2965

File tree

1 file changed

+78
-28
lines changed

1 file changed

+78
-28
lines changed

doc/_static/css/custom.css

Lines changed: 78 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -114,42 +114,92 @@ hr,
114114
}
115115

116116
/* JavaScript documentation directives */
117-
.rst-content dl:not(.docutils) dt {
118-
background-color: var(--admonition-note-background-color) !important;
119-
border-color: var(--admonition-note-title-background-color) !important;
120-
color: var(--admonition-note-color) !important;
117+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dt,
118+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt {
119+
background-color: var(--admonition-note-background-color);
120+
border-color: var(--admonition-note-title-background-color);
121+
color: var(--admonition-note-color);
121122
}
122-
.rst-content dl:not(.docutils) dl dt {
123-
background-color: var(--admonition-attention-background-color) !important;
124-
border-color: var(--admonition-attention-title-background-color) !important;
125-
color: var(--admonition-attention-color) !important;
123+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl dt {
124+
background-color: transparent;
125+
border-color: transparent;
126+
color: var(--footer-color);
126127
}
127-
128-
.rst-content dt.sig .k {
129-
color: var(--highlight-keyword2-color) !important;
130-
font-style: normal !important;
128+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt,
129+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt,
130+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt,
131+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute dt {
132+
font-weight: 600;
133+
padding: 0 8px;
134+
margin-bottom: 1px;
135+
width: 100%;
131136
}
132-
133-
.rst-content dt.sig .kt {
134-
color: var(--highlight-keyword-color) !important;
135-
font-style: normal !important;
137+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class > dt,
138+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function > dt,
139+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method > dt,
140+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).attribute > dt {
141+
font-family: var(--monospace-font-family);
142+
font-variant-ligatures: none;
143+
font-size: 90%;
144+
font-weight: normal;
145+
margin-bottom: 16px;
146+
padding: 6px 8px;
147+
}
148+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-prename.descclassname {
149+
color: var(--highlight-type2-color);
150+
font-weight: normal;
136151
}
137-
138-
.rst-content dt.sig .sig-name .n {
139-
color: var(--highlight-function-color) !important;
152+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name.descname {
153+
color: var(--highlight-function-color);
154+
font-weight: 700;
140155
}
141-
142-
.rst-content dt.sig .k,
143-
.rst-content dt.sig .kt,
144-
.rst-content dt.sig .n {
145-
font-weight: normal !important;
156+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-paren,
157+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional {
158+
color: var(--highlight-operator-color) !important;
159+
font-weight: normal;
160+
padding: 0 2px;
146161
}
147-
148-
.rst-content dl:not(.docutils) dt a.headerlink {
162+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional {
163+
font-style: italic;
164+
}
165+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-param,
166+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > em,
167+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt > em,
168+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt > em {
169+
color: var(--code-literal-color);
170+
font-style: normal;
171+
padding: 0 4px;
172+
}
173+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .k {
174+
font-style: normal;
175+
}
176+
html.writer-html5 .rst-content dl:not(.docutils) > dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt {
177+
border-top-color: var(--highlight-background-emph-color);
178+
background: var(--highlight-background-color);
179+
}
180+
html.writer-html5 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt {
181+
border-left-color: var(--highlight-background-emph-color);
182+
background: var(--highlight-background-color);
183+
}
184+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-param,
185+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > .optional ~ em,
186+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).function dt > .optional ~ em,
187+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).method dt > .optional ~ em {
188+
color: var(--highlight-number-color);
189+
font-style: italic;
190+
}
191+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple).class dt > em.property {
192+
color: var(--highlight-keyword-color);
193+
}
194+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dt a.headerlink {
149195
color: var(--link-color) !important;
150196
}
151-
.rst-content dl:not(.docutils) dt a.headerlink:visited {
152-
color: var(--link-color-visited) !important;
197+
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dt a.headerlink:visited {
198+
color: var(--link-color-visited);
199+
}
200+
html.writer-html5 .rst-content dl.field-list > dd strong {
201+
font-family: var(--monospace-font-family);
202+
font-variant-ligatures: none;
153203
}
154204

155205
footer,

0 commit comments

Comments
 (0)