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

Add support for versionremoved directive #2087

Merged
merged 5 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions docs/examples/kitchen-sink/admonitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,10 @@ Sphinx provides several different types of admonitions.
.. deprecated:: v0.1.1

Here's a deprecation message.

``versionremoved``
==================

.. versionremoved:: v0.1.1

Here's a version removed message.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
div.versionadded,
div.versionchanged,
div.deprecated {
div.deprecated,
div.versionremoved {
vertical-align: middle;
margin: 1.5625em auto;
padding: 0 0.6rem;
Expand Down Expand Up @@ -34,7 +35,8 @@ div.versionchanged {
background-color: var(--pst-color-warning-bg);
}

div.deprecated {
div.deprecated,
div.versionremoved {
border-color: var(--pst-color-danger);
background-color: var(--pst-color-danger-bg);
}
Expand Down Expand Up @@ -70,3 +72,10 @@ span.versionmodified.deprecated {
content: var(--pst-icon-versionmodified-deprecated);
}
}

span.versionmodified.removed {
&::before {
color: var(--pst-color-danger);
content: var(--pst-icon-versionmodified-removed);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ html {
--pst-icon-versionmodified-added: var(--pst-icon-exclamation-circle);
--pst-icon-versionmodified-changed: var(--pst-icon-exclamation-circle);
--pst-icon-versionmodified-deprecated: var(--pst-icon-exclamation-circle);
--pst-icon-versionmodified-removed: var(--pst-icon-exclamation-circle);
}
4 changes: 4 additions & 0 deletions tests/intermittent_warning_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ WARNING: Cell printed to stderr:
Matplotlib is building the font cache; this may take a moment.
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory
# THESE 3 WILL GO AWAY WHEN OUR MIN SPHINX VERSION IS 7.3 OR HIGHER
Here's a version removed message.
.. versionremoved:: v0.1.1
ERROR: Unknown directive type "versionremoved".
Loading