diff --git a/src/qiskit_sphinx_theme/assets/styles/_scaffold.scss b/src/qiskit_sphinx_theme/assets/styles/_scaffold.scss new file mode 100644 index 00000000..8bbe766c --- /dev/null +++ b/src/qiskit_sphinx_theme/assets/styles/_scaffold.scss @@ -0,0 +1,22 @@ +/* This code is a Qiskit project. + * + * (C) Copyright IBM 2024. + * + * This code is licensed under the Apache License, Version 2.0. You may + * obtain a copy of this license in the LICENSE.txt file in the root directory + * of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. + * + * Any modifications or derivative works of this code must retain this + * copyright notice, and modified files need to carry a notice indicating + * that they have been altered from the originals. + */ + +body { + // Make navigation and toc icons primary instead of secondary color + .toc-overlay-icon, + .nav-overlay-icon { + .icon { + color: var(--color-foreground-primary); + } + } +} diff --git a/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss b/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss index 07769fd8..09ea63cf 100644 --- a/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss +++ b/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss @@ -19,6 +19,7 @@ @import "icons"; @import "layout"; @import "left-sidebar"; +@import "scaffold"; @import "sphinx-extensions"; @import "tables"; @import "typography"; diff --git a/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html b/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html index a26ae21f..0a2a6b6f 100644 --- a/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html +++ b/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html @@ -2,8 +2,7 @@ This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. We've made substantial changes to comply with IBM Carbon requirements - (https://carbondesignsystem.com/guidelines/icons/library/). These - have all been replaced with Carbon icons: + (https://carbondesignsystem.com/). These have all been replaced with Carbon icons: * svg-menu * svg-toc @@ -11,40 +10,37 @@ * svg-pencil * svg-eye - The SVGs downloaded from the Carbon website were edited to remove a transparent rectangle and simplify formatting. - See https://github.com/Qiskit/qiskit_sphinx_theme/pull/612. + We obtained the icons from Figma and made the following edits to the SVG: - We keep the icons for sun, moon, sun-half, svg-sun-with-moon, and svg-moon-with-sun, but only because we disabled dark mode, so it's - irrelevant. + * Deleted the transparent `rect` element that was present. + * Replaced the value of the `fill` property with "currentColor". -#} Contents - - + + Menu - - - - - + + + + + Expand - - {#- We add `stroke` so that setting the color in outer CSS rules works, which Furo does. -#} - + + Light mode + stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -59,7 +55,7 @@ Dark mode + stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> @@ -67,7 +63,7 @@ Auto light/dark mode + stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow"> @@ -80,7 +76,7 @@ Auto light/dark, in light mode @@ -97,7 +93,7 @@ Auto light/dark, in dark mode @@ -112,27 +108,16 @@ - - - edit - - + + + - - document--view - - - - + + + + \ No newline at end of file diff --git a/tests/js/tests.js-snapshots/Jupyter-works-with-copybutton-1-linux.png b/tests/js/tests.js-snapshots/Jupyter-works-with-copybutton-1-linux.png index 9a5fdd2e..4733fbe2 100644 Binary files a/tests/js/tests.js-snapshots/Jupyter-works-with-copybutton-1-linux.png and b/tests/js/tests.js-snapshots/Jupyter-works-with-copybutton-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png b/tests/js/tests.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png index f85b594d..2255d030 100644 Binary files a/tests/js/tests.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png and b/tests/js/tests.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/api-docs-class-page-1-linux.png b/tests/js/tests.js-snapshots/api-docs-class-page-1-linux.png index e999b083..7385f539 100644 Binary files a/tests/js/tests.js-snapshots/api-docs-class-page-1-linux.png and b/tests/js/tests.js-snapshots/api-docs-class-page-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/api-docs-function-page-1-linux.png b/tests/js/tests.js-snapshots/api-docs-function-page-1-linux.png index 55d89320..4f933584 100644 Binary files a/tests/js/tests.js-snapshots/api-docs-function-page-1-linux.png and b/tests/js/tests.js-snapshots/api-docs-function-page-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/api-docs-inline-classes-1-linux.png b/tests/js/tests.js-snapshots/api-docs-inline-classes-1-linux.png index 031da7eb..515150e0 100644 Binary files a/tests/js/tests.js-snapshots/api-docs-inline-classes-1-linux.png and b/tests/js/tests.js-snapshots/api-docs-inline-classes-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/api-docs-module-page-1-linux.png b/tests/js/tests.js-snapshots/api-docs-module-page-1-linux.png index fcfc42b1..f0c79802 100644 Binary files a/tests/js/tests.js-snapshots/api-docs-module-page-1-linux.png and b/tests/js/tests.js-snapshots/api-docs-module-page-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/custom-directives-2-linux.png b/tests/js/tests.js-snapshots/custom-directives-2-linux.png index b08c139b..f8eadee7 100644 Binary files a/tests/js/tests.js-snapshots/custom-directives-2-linux.png and b/tests/js/tests.js-snapshots/custom-directives-2-linux.png differ diff --git a/tests/js/tests.js-snapshots/custom-directives-4-linux.png b/tests/js/tests.js-snapshots/custom-directives-4-linux.png index f7ec3142..bfe492c3 100644 Binary files a/tests/js/tests.js-snapshots/custom-directives-4-linux.png and b/tests/js/tests.js-snapshots/custom-directives-4-linux.png differ diff --git a/tests/js/tests.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png b/tests/js/tests.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png index f53936cc..fb828dcd 100644 Binary files a/tests/js/tests.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png and b/tests/js/tests.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/left-side-bar-previous-releases-are-expandable-1-linux.png b/tests/js/tests.js-snapshots/left-side-bar-previous-releases-are-expandable-1-linux.png index 661a1a88..2df6c721 100644 Binary files a/tests/js/tests.js-snapshots/left-side-bar-previous-releases-are-expandable-1-linux.png and b/tests/js/tests.js-snapshots/left-side-bar-previous-releases-are-expandable-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/left-side-bar-renders-correctly-1-linux.png b/tests/js/tests.js-snapshots/left-side-bar-renders-correctly-1-linux.png index e1cfbb7a..71bfd334 100644 Binary files a/tests/js/tests.js-snapshots/left-side-bar-renders-correctly-1-linux.png and b/tests/js/tests.js-snapshots/left-side-bar-renders-correctly-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/left-side-bar-translations-are-expandable-1-linux.png b/tests/js/tests.js-snapshots/left-side-bar-translations-are-expandable-1-linux.png index ee72d6b3..e7e82cdc 100644 Binary files a/tests/js/tests.js-snapshots/left-side-bar-translations-are-expandable-1-linux.png and b/tests/js/tests.js-snapshots/left-side-bar-translations-are-expandable-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-1-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-1-linux.png index 43e06500..db6196b4 100644 Binary files a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-1-linux.png and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-icons-on-mobile-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-page-ToC-icon-on-tablet-1-linux.png b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-page-ToC-icon-on-tablet-1-linux.png index 37e88534..b544f723 100644 Binary files a/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-page-ToC-icon-on-tablet-1-linux.png and b/tests/js/tests.js-snapshots/top-nav-bar-uses-custom-page-ToC-icon-on-tablet-1-linux.png differ