FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add backgrounds and borders to admonitions by hugovk · Pull Request #190 · python/python-docs-theme · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .css  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
75 changes: 70 additions & 5 deletions python_docs_theme/static/pydoctheme.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,76 @@ div.body pre {
border: 1px solid #ac9;
}

div.body div.admonition,
/* Admonitions */
:root {
--admonition-background: #eee;
--admonition-border: #ccc;
--admonition-color: black;
--attention-background: #bbddff5c;
--attention-border: #0000ff36;
--caution-background: #ffc;
--caution-border: #dd6;
--danger-background: #ffe4e4;
--danger-border: red;
--error-background: #ffe4e4;
--error-border: red;
--hint-background: #dfd;
--hint-border: green;
--seealso-background: #ffc;
--seealso-border: #dd6;
--tip-background: #dfd;
--tip-border: green;
--warning-background: #ffe4e4;
--warning-border: red;
Comment thread
hugovk marked this conversation as resolved.
}

div.body div.admonition {
background-color: var(--admonition-background);
Comment thread
hugovk marked this conversation as resolved.
border: 1px solid var(--admonition-border);
border-radius: 3px;
color: var(--admonition-color);
}

div.body div.admonition.attention {
background-color: var(--attention-background);
border-color: var(--attention-border);
}

div.body div.admonition.caution {
background-color: var(--caution-background);
border-color: var(--caution-border);
}

div.body div.admonition.danger {
background-color: var(--danger-background);
border-color: var(--danger-border);
}

div.body div.admonition.error {
background-color: var(--error-background);
border-color: var(--error-border);
}

div.body div.admonition.hint {
background-color: var(--hint-background);
border-color: var(--hint-border);
}

div.body div.admonition.seealso {
background-color: var(--seealso-background);
border-color: var(--seealso-border);
}

div.body div.admonition.tip {
background-color: var(--tip-background);
border-color: var(--tip-border);
}

div.body div.admonition.warning {
background-color: var(--warning-background);
border-color: var(--warning-border);
}

div.body div.impl-detail {
border-radius: 3px;
}
Expand All @@ -251,10 +320,6 @@ div.body div.impl-detail > p {
margin: 0;
}

div.body div.seealso {
border: 1px solid #dddd66;
}

div.body a {
color: #0072aa;
}
Expand Down
23 changes: 23 additions & 0 deletions python_docs_theme/static/pydoctheme_dark.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,29 @@ div.warning {
background-color: rgba(255, 0, 0, 0.5);
}

/* Admonitions */
:root {
--admonition-background: #ffffff1a;
--admonition-border: currentColor;
--admonition-color: #ffffffde;
--attention-background: #ffffff1a;
--attention-border: currentColor;
--caution-background: #ffff001a;
--caution-border: #dd6;
--danger-background: #f003;
--danger-border: #f66;
--error-background: #f003;
--error-border: #f66;
--hint-background: #0044117a;
--hint-border: green;
--seealso-background: #ffff001a;
--seealso-border: #dd6;
--tip-background: #0044117a;
--tip-border: green;
--warning-background: #ff000033;
--warning-border: #ff6666;
}

aside.topic,
div.topic,
div.note,
Expand Down

Back | FazBrowse Home | New Git URL