Skip to content

Commit d2b3a3b

Browse files
Update API styling for changes in sphinx 4.x (#485)
1 parent a020b1f commit d2b3a3b

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

pydata_sphinx_theme/static/css/index.f32233a4d17734d070b2529adb954f89.css renamed to pydata_sphinx_theme/static/css/index.f8312eac34e2432659a6ef7e609c047e.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydata_sphinx_theme/static/webpack-macros.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
{% macro head_pre_bootstrap() %}
1515
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet">
16-
<link href="{{ pathto('_static/css/index.f32233a4d17734d070b2529adb954f89.css', 1) }}" rel="stylesheet">
16+
<link href="{{ pathto('_static/css/index.f8312eac34e2432659a6ef7e609c047e.css', 1) }}" rel="stylesheet">
1717
{% endmacro %}
1818

1919
{% macro head_js_preload() %}
20-
<link rel="preload" as="script" href="{{ pathto('_static/js/index.62238795a76836e14efb.js', 1) }}">
20+
<link rel="preload" as="script" href="{{ pathto('_static/js/index.c258f241e0e9126fa012.js', 1) }}">
2121
{% endmacro %}
2222

2323
{% macro body_post() %}
24-
<script src="{{ pathto('_static/js/index.62238795a76836e14efb.js', 1) }}"></script>
24+
<script src="{{ pathto('_static/js/index.c258f241e0e9126fa012.js', 1) }}"></script>
2525
{% endmacro %}

src/scss/_api.scss

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,43 @@ table.field-list {
4646
white-space: nowrap;
4747
}
4848
}
49+
50+
51+
/* overriding basic.css to use our own monospace font */
52+
.sig {
53+
font-family: var(--pst-font-family-monospace);
54+
}
55+
56+
57+
/* C++ specific styling - overriding the basic.css to avoid custom colors*/
58+
59+
.sig-inline.c-texpr,
60+
.sig-inline.cpp-texpr {
61+
font-family: unset;
62+
}
63+
64+
.sig.c .k, .sig.c .kt,
65+
.sig.cpp .k, .sig.cpp .kt {
66+
color: rgba(var(--pst-color-text-base), 1);
67+
}
68+
69+
.sig.c .m,
70+
.sig.cpp .m {
71+
color: rgba(var(--pst-color-text-base), 1);
72+
}
73+
74+
.sig.c .s, .sig.c .sc,
75+
.sig.cpp .s, .sig.cpp .sc {
76+
color: rgba(var(--pst-color-text-base), 1);
77+
}
78+
79+
// addition
80+
81+
// .sig.c .sig-name .n,
82+
// .sig.cpp .sig-name .n {
83+
// color: rgba(var(--pst-color-inline-code), 1);
84+
// }
85+
86+
.sig-name {
87+
color: rgba(var(--pst-color-inline-code), 1);
88+
}

0 commit comments

Comments
 (0)