Skip to content

Commit

Permalink
Add support for versionremoved directive
Browse files Browse the repository at this point in the history
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.

I'll also attach a screenshot.

- Closes pydata#2086
  • Loading branch information
stevepiercy committed Dec 20, 2024
1 parent 1b3e65e commit 121f352
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
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 @@ -64,9 +66,10 @@ span.versionmodified.changed {
}
}

span.versionmodified.deprecated {
span.versionmodified.deprecated,
span.versionmodified.removed {
&::before {
color: var(--pst-color-danger);
content: var(--pst-icon-versionmodified-deprecated);
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);
}

0 comments on commit 121f352

Please sign in to comment.