Skip to content

Commit

Permalink
Merge pull request #190 from hugovk/admonition-colour
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Jun 24, 2024
2 parents 97952b5 + 338ed55 commit af191cc
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 5 deletions.
75 changes: 70 additions & 5 deletions python_docs_theme/static/pydoctheme.css
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;
}

div.body div.admonition {
background-color: var(--admonition-background);
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
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

0 comments on commit af191cc

Please sign in to comment.