Skip to content

Commit

Permalink
Update API styling for changes in sphinx 4.x (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Oct 1, 2021
1 parent a020b1f commit d2b3a3b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pydata_sphinx_theme/static/webpack-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

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

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

{% macro body_post() %}
<script src="{{ pathto('_static/js/index.62238795a76836e14efb.js', 1) }}"></script>
<script src="{{ pathto('_static/js/index.c258f241e0e9126fa012.js', 1) }}"></script>
{% endmacro %}
40 changes: 40 additions & 0 deletions src/scss/_api.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,43 @@ table.field-list {
white-space: nowrap;
}
}


/* overriding basic.css to use our own monospace font */
.sig {
font-family: var(--pst-font-family-monospace);
}


/* C++ specific styling - overriding the basic.css to avoid custom colors*/

.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}

.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: rgba(var(--pst-color-text-base), 1);
}

.sig.c .m,
.sig.cpp .m {
color: rgba(var(--pst-color-text-base), 1);
}

.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: rgba(var(--pst-color-text-base), 1);
}

// addition

// .sig.c .sig-name .n,
// .sig.cpp .sig-name .n {
// color: rgba(var(--pst-color-inline-code), 1);
// }

.sig-name {
color: rgba(var(--pst-color-inline-code), 1);
}

0 comments on commit d2b3a3b

Please sign in to comment.