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 colour to version change directives #185

Merged
merged 1 commit into from
Mar 29, 2024
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
47 changes: 47 additions & 0 deletions python_docs_theme/static/pydoctheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,50 @@ div.genindex-jumpbox a {
margin-top: -2em;
}
}

/* Version change directives */
:root {
--versionadded: rgb(41 100 51);
--versionchanged: rgb(133 72 38);
--deprecated: rgb(159 49 51);

--versionadded-border: rgb(79 196 100);
--versionchanged-border: rgb(244, 227, 76);
--deprecated-border: rgb(244, 76, 78);
}

div.versionadded,
div.versionchanged,
div.deprecated,
div.deprecated-removed {
border-left: 3px solid;
padding: 0 1rem;
}

div.versionadded {
border-left-color: var(--versionadded-border);
}

div.versionchanged {
border-left-color: var(--versionchanged-border);
}

div.deprecated,
div.deprecated-removed,
div.versionremoved {
border-left-color: var(--deprecated-border);
}

div.versionadded .versionmodified {
color: var(--versionadded);
}

div.versionchanged .versionmodified {
color: var(--versionchanged);
}

div.deprecated .versionmodified,
div.deprecated-removed .versionmodified,
div.versionremoved .versionmodified {
color: var(--deprecated);
}
7 changes: 7 additions & 0 deletions python_docs_theme/static/pydoctheme_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,10 @@ img.invert-in-dark-mode {
.sig.cpp .k, .sig.cpp .kt {
color: #5283ff;
}

/* Version change directives */
:root {
--versionadded: rgb(79 196 100);
--versionchanged: rgb(244, 227, 76);
--deprecated: rgb(244, 76, 78);
}
Loading