Skip to content

Commit 6345c7d

Browse files
Add support for versionremoved directive (#2087)
Note that I added a snippet in the Kitchen Sink to preview the change. I have an open PR in sphinx-themes/sphinx-themes.org#163 to add it upstream. I can remove this snippet, if you prefer, or you can clobber it the next time you run a sync. ![Screenshot 2024-12-20 at 3 38 59 AM](https://github.com/user-attachments/assets/8bec8c56-ca63-44b2-8d34-e5988ba69bce) ![Screenshot 2024-12-20 at 3 40 17 AM](https://github.com/user-attachments/assets/bb1a93da-28c4-4152-be28-34f1eea9d98e) - Closes #2086 --------- Co-authored-by: Daniel McCloy <[email protected]>
1 parent d5c1265 commit 6345c7d

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

docs/examples/kitchen-sink/admonitions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,10 @@ Sphinx provides several different types of admonitions.
121121
.. deprecated:: v0.1.1
122122

123123
Here's a deprecation message.
124+
125+
``versionremoved``
126+
==================
127+
128+
.. versionremoved:: v0.1.1
129+
130+
Here's a version removed message.

src/pydata_sphinx_theme/assets/styles/components/_versionmodified.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
div.versionadded,
22
div.versionchanged,
3-
div.deprecated {
3+
div.deprecated,
4+
div.versionremoved {
45
vertical-align: middle;
56
margin: 1.5625em auto;
67
padding: 0 0.6rem;
@@ -34,7 +35,8 @@ div.versionchanged {
3435
background-color: var(--pst-color-warning-bg);
3536
}
3637

37-
div.deprecated {
38+
div.deprecated,
39+
div.versionremoved {
3840
border-color: var(--pst-color-danger);
3941
background-color: var(--pst-color-danger-bg);
4042
}
@@ -70,3 +72,10 @@ span.versionmodified.deprecated {
7072
content: var(--pst-icon-versionmodified-deprecated);
7173
}
7274
}
75+
76+
span.versionmodified.removed {
77+
&::before {
78+
color: var(--pst-color-danger);
79+
content: var(--pst-icon-versionmodified-removed);
80+
}
81+
}

src/pydata_sphinx_theme/assets/styles/variables/_versionmodified.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ html {
77
--pst-icon-versionmodified-added: var(--pst-icon-exclamation-circle);
88
--pst-icon-versionmodified-changed: var(--pst-icon-exclamation-circle);
99
--pst-icon-versionmodified-deprecated: var(--pst-icon-exclamation-circle);
10+
--pst-icon-versionmodified-removed: var(--pst-icon-exclamation-circle);
1011
}

tests/intermittent_warning_list.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ WARNING: Cell printed to stderr:
22
Matplotlib is building the font cache; this may take a moment.
33
WARNING: failed to reach any of the inventories with the following issues:
44
intersphinx inventory
5+
# THESE 3 WILL GO AWAY WHEN OUR MIN SPHINX VERSION IS 7.3 OR HIGHER
6+
Here's a version removed message.
7+
.. versionremoved:: v0.1.1
8+
ERROR: Unknown directive type "versionremoved".

0 commit comments

Comments
 (0)