Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the color of output cell for sphinx-gallery #85

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import "../basic.css";
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@600&display=swap');
@import "../tabs.css";
@import "../sg_gallery.css";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@import "../sg_gallery.css";
@import "../sg_gallery.css";

From this line, I'm not sure if a file called sg_gallery.css should be in the _static folder or not. I am no expert in CSS or HTML, so it is your call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes if we are using sphinx_gallery and importing the package, then it will be there in _static folder.



@font-face {
Expand Down Expand Up @@ -83,6 +84,8 @@ html[data-theme="light"] {
--pst-color-link-hover: #005B81;
--pst-color-inline-code: rgb(232, 62, 140);
--pst-color-target: rgb(255, 255, 255);
/* color for sphinx-gallery-code output*/
--pst-color-codeout: #fafae2;
}

html[data-theme="dark"] {
Expand All @@ -92,7 +95,7 @@ html[data-theme="dark"] {
--pst-color-primary: rgb(255, 183, 27);
--pst-color-secondary: rgb(200, 146, 17);
--pst-color-success: rgb(72, 135, 87);
--pst-color-text-base: rgb(201, 209, 217);
--pst-color-text-base: rgb(217, 215, 201);
--pst-color-text-muted: rgb(192, 192, 192);
--pst-color-border: rgb(192, 192, 192);
--pst-color-shadow: var(--pst-color-background);
Expand All @@ -115,6 +118,8 @@ html[data-theme="dark"] {
--pst-color-link-hover: #005B81;
--pst-color-inline-code: rgb(221, 158, 194);
--pst-color-target: rgb(71, 39, 0);
/* color for sphinx-gallery-code output*/
--pst-color-codeout: #6c757d;
}

.admonition, div.admonition{
Expand Down Expand Up @@ -428,3 +433,12 @@ a > code.download
text-decoration: none;
font-weight: normal;
}

/*
########################
Sphinx gallery output
########################
*/
.sphx-glr-script-out .highlight pre{
background-color: var(--pst-color-codeout) !important;
}