Skip to content

Commit 6974bcb

Browse files
Revathyvenugopal162pyansys-ci-botjorgepiloto
authored
fix: update the style for highlight name function (#652)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Jorge Martínez <[email protected]>
1 parent eb46b85 commit 6974bcb

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

doc/changelog.d/652.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update the style for highlight name function

src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme-variable.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* Contains variables for colors and fonts used in the theme */
22
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap");
33

4+
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap');
5+
46
@font-face {
57
font-family: "Source Sans Pro Light";
68
src: url(../fonts/SourceSansPro-Light.ttf);
@@ -33,6 +35,7 @@
3335
var(--pst-font-family-monospace-system);
3436
--ast-body-family: "Open Sans", sans-serif;
3537
--ast-header-family: "Source Sans Pro", sans-serif;
38+
--ast-code-family: "Source Code Pro", monospace;
3639

3740
/**
3841
* Ansys compatible colors

src/ansys_sphinx_theme/assets/styles/ast-search.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
/* Highlighted Text */
5151
html[data-theme="light"] .highlight {
5252
color: var(--ast-highlight-color);
53+
font-family: var(--ast-code-family);
5354
}
5455

5556
/* Search Input Styles */

src/ansys_sphinx_theme/assets/styles/pydata-sphinx-theme-custom.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,3 +779,17 @@ button.btn.version-switcher__button:hover {
779779
span.math {
780780
display: math;
781781
}
782+
783+
/**
784+
* code block name function
785+
*/
786+
787+
div.highlight .nf{
788+
font-family: var(--ast-code-family);
789+
-webkit-font-smoothing: auto;
790+
}
791+
792+
793+
code, kbd, pre, samp {
794+
font-family: var(--ast-code-family);
795+
}

src/ansys_sphinx_theme/assets/styles/sphinx-gallery.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.highlight {
66
pre {
77
font-size: 0.9em;
8+
font-family: var(--ast-code-family);
89
}
910
}
1011

0 commit comments

Comments
 (0)