Merge pull request #1319 from satotake/fix-website-alert-color

docs: fix color contrast of admonitions
This commit is contained in:
Sam Alba 2022-01-03 09:30:00 -08:00 committed by GitHub
commit b51b611e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,6 +103,9 @@ h2 {
code { code {
margin: 0 1px; margin: 0 1px;
color: var(--ifm-code-color); color: var(--ifm-code-color);
.alert & {
color: var(--ifm-alert-foreground-color);
}
} }
.markdown { .markdown {
@ -618,7 +621,7 @@ img[alt="github-contribute"] {
.admonition-#{$name} .admonition-icon::before { .admonition-#{$name} .admonition-icon::before {
mask: url($path); mask: url($path);
content: ""; content: "";
background-color: var(--ifm-color-primary-dark); background-color: var(--ifm-alert-foreground-color);
display: block; display: block;
width: 22px; width: 22px;
height: 22px; height: 22px;
@ -633,17 +636,3 @@ img[alt="github-contribute"] {
$caution: "/img/Dagger_Icons_Caution.svg", $caution: "/img/Dagger_Icons_Caution.svg",
$danger: "/img/Dagger_Icons_Danger.svg" $danger: "/img/Dagger_Icons_Danger.svg"
); );
$alert: secondary, success, info, warning, danger;
@each $name in $alert {
$color: if(
$name==danger,
var(--ifm-color-primary-light),
var(--ifm-color-primary-dark)
);
.admonition.alert--#{$name} {
color: $color;
}
}