diff --git a/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss b/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss index 2e3dbae4..4c3c9829 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss @@ -32,6 +32,12 @@ p.topic-title { } } +.admonition p.admonition-title, +p.topic-title { + // We have to add one pixel or else the ::before vertical line has a gap. + margin-left: -0.5625rem; +} + // Admonitions are complex because they use a 3px left border with a different color than the rest // of the div. If we naively used `border-left`, we'd end up with a weird-looking diagonal, as // described at @@ -149,6 +155,13 @@ div.deprecated { } } +div.deprecated, +div.versionadded, +div.versionchanged, +div.versionremoved { + border-radius: 0; +} + div.deprecated::before { background: var(--qiskit-color-warning-border); content: ""; @@ -163,7 +176,7 @@ span.deprecated { background-color: var(--qiskit-color-warning-background); font-size: var(--admonition-title-font-size); line-height: 1.3; - margin: 0 -0.5rem 0.25rem -0.55rem; + margin: 0 -0.5625rem 0.25rem -0.55rem; padding: 0.4rem; position: relative; display: block; diff --git a/tests/js/tests.js-snapshots/dark-mode-admonitions-use-Carbon-style-1-linux.png b/tests/js/tests.js-snapshots/dark-mode-admonitions-use-Carbon-style-1-linux.png index a85bb4a1..2f168036 100644 Binary files a/tests/js/tests.js-snapshots/dark-mode-admonitions-use-Carbon-style-1-linux.png and b/tests/js/tests.js-snapshots/dark-mode-admonitions-use-Carbon-style-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/dark-mode-api-docs-module-page-1-linux.png b/tests/js/tests.js-snapshots/dark-mode-api-docs-module-page-1-linux.png index 5cbcb5e8..70187cd3 100644 Binary files a/tests/js/tests.js-snapshots/dark-mode-api-docs-module-page-1-linux.png and b/tests/js/tests.js-snapshots/dark-mode-api-docs-module-page-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/dark-mode-deprecations-look-like-warning-1-linux.png b/tests/js/tests.js-snapshots/dark-mode-deprecations-look-like-warning-1-linux.png index 13f6c324..015e7667 100644 Binary files a/tests/js/tests.js-snapshots/dark-mode-deprecations-look-like-warning-1-linux.png and b/tests/js/tests.js-snapshots/dark-mode-deprecations-look-like-warning-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/light-mode-admonitions-use-Carbon-style-1-linux.png b/tests/js/tests.js-snapshots/light-mode-admonitions-use-Carbon-style-1-linux.png index 6b2c0b7b..95a32a58 100644 Binary files a/tests/js/tests.js-snapshots/light-mode-admonitions-use-Carbon-style-1-linux.png and b/tests/js/tests.js-snapshots/light-mode-admonitions-use-Carbon-style-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/light-mode-api-docs-module-page-1-linux.png b/tests/js/tests.js-snapshots/light-mode-api-docs-module-page-1-linux.png index a95dec14..a0dd9c30 100644 Binary files a/tests/js/tests.js-snapshots/light-mode-api-docs-module-page-1-linux.png and b/tests/js/tests.js-snapshots/light-mode-api-docs-module-page-1-linux.png differ diff --git a/tests/js/tests.js-snapshots/light-mode-deprecations-look-like-warning-1-linux.png b/tests/js/tests.js-snapshots/light-mode-deprecations-look-like-warning-1-linux.png index ebec903d..631680a3 100644 Binary files a/tests/js/tests.js-snapshots/light-mode-deprecations-look-like-warning-1-linux.png and b/tests/js/tests.js-snapshots/light-mode-deprecations-look-like-warning-1-linux.png differ