Skip to content

Commit

Permalink
Namespace the box classes a bit
Browse files Browse the repository at this point in the history
Avoid conflicting with other generic names
  • Loading branch information
ISSOtm committed Dec 17, 2023
1 parent b094467 commit 15b00d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions custom/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,28 @@ code {
text-transform: uppercase;
}

.box.tip {
.tip-box {
border-color: #42b983;
background-color: var(--quote-bg);
}

.box.warning {
.warning-box {
border-left-color: var(--c-warning);
background-color: rgba(255, 229, 100, 0.2);
color: var(--c-warning-text);
}

.box.warning > .box-title {
.warning-box > .box-title {
color: var(--c-warning-title);
}

.box.danger {
.danger-box {
border-left-color: var(--c-danger);
background-color: rgba(255, 0, 0, .15);
color: var(--c-danger-text);
}

.box.danger > .box-title {
.danger-box > .box-title {
color: var(--c-danger-title);
}

Expand Down
4 changes: 2 additions & 2 deletions preproc/src/admonitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ impl<'a, Iter: Iterator<Item = Event<'a>>> Iterator for AdmonitionsGenerator<'a,

evt = Event::Html(
if title.is_empty() {
format!("<div class=\"box {kind}\">")
format!("<div class=\"box {kind}-box\">")
} else {
format!("<div class=\"box {kind}\"><p class=\"box-title\">{title}</p>")
format!("<div class=\"box {kind}-box\"><p class=\"box-title\">{title}</p>")
}
.into(),
);
Expand Down

0 comments on commit 15b00d2

Please sign in to comment.