Skip to content

Commit

Permalink
fix: improve admonition style
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed May 31, 2024
1 parent 1df91c8 commit 9deb921
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions static/css/contents/admonition.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
display: flex;
flex-direction: column;
position: relative;
padding: 0 16px 0.8rem;
padding: 0.825rem 1rem;
margin-top: 1rem;
margin-bottom: 1rem;
border-left: 4px solid var(--color-3);
Expand All @@ -101,9 +101,22 @@
background-color: var(--color-3);
}

.admonition:after {
position: absolute;
content: '';
top: 10px;
left: -8px;
mask: var(--icon-url) no-repeat;
mask-size: 100% 100%;
font-style: normal;
width: 12px;
height: 12px;
background-color: #fff;
}

.admonition p.admonition-title {
position: relative;
margin: 0 -16px 0.8rem -19px;
margin: -0.825rem -1rem 0.825rem -19px;
padding: 4px 18px;
font-size: .85rem;
font-weight: 600;
Expand All @@ -119,19 +132,6 @@
display: inline-block;
}

.admonition-title:before {
position: absolute;
content: '';
top: 10px;
left: -5px;
mask: var(--icon-url) no-repeat;
mask-size: 100% 100%;
font-style: normal;
width: 12px;
height: 12px;
background-color: #fff;
}

.admonition.attention {
--icon-url: var(--attention-icon);
--color-1: var(--attention-1);
Expand Down

0 comments on commit 9deb921

Please sign in to comment.