trwnh.com/unified.test.hugo/assets/styles/components/admonition.scss

93 lines
No EOL
3.5 KiB
SCSS

.admonition {
background: var(--ui-overlay-transparent);
border-inline-start: 0.4em solid var(--ui-overlay);
// border-radius: 1em;
padding-block-start: 1em;
padding-block-end: 1em;
position: relative;
&-header {
display: contents;
}
&__text {
padding-inline: 1em;
> *:first-child {
margin-block-start: 0;
}
> *:last-child {
margin-block-end: 0;
}
}
/* prepend an icon depending on the type of the admonition */
&:before {
content: '';
display: block;
position: absolute;
box-sizing: border-box;
inline-size: 2.5em;
block-size: 2.5em;
border-radius: 100em;
inset-inline-start: 1em;
inset-block-start: 1em;
background-repeat: no-repeat;
background-position: center;
background-size: 60%;
}
&__title {
font-size: 1em;
font-weight: bold;
padding-inline: 1em;
margin-block-start: 0.25em;
margin-inline-start: 3em;
margin-block-end: 1em;
}
&[data-type="info"],
&[data-type="note"],
&[data-type="tip"],
&[data-type="hint"]
{
// background-color: hsl(210, 50%, 10%);
border-color: hsl(210, 50%, 50%);
&:before {
background-color: hsl(210, 50%, 50%);
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjAgMjAiPjxwYXRoIGZpbGw9IndoaXRlIiBkPSJNMTAgMmM0LjQyIDAgOCAzLjU4IDggOHMtMy41OCA4LTggOHMtOC0zLjU4LTgtOHMzLjU4LTggOC04bTEgNGMwLS41NS0uNDUtMS0xLTFzLTEgLjQ1LTEgMXMuNDUgMSAxIDFzMS0uNDUgMS0xbTAgOVY5SDl2NnoiLz48L3N2Zz4=);
}
}
&[data-type="recommended"],
&[data-type="recommendation"],
&[data-type="good"],
&[data-type="suggestion"],
&[data-type="suggested"],
&[data-type="success"]
{
// background-color: hsl(210, 50%, 10%);
border-color: hsl(120, 50%, 50%);
&:before {
background-color: hsl(120, 50%, 50%);
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9IndoaXRlIiBkPSJtOS41NSAxOGwtNS43LTUuN2wxLjQyNS0xLjQyNUw5LjU1IDE1LjE1bDkuMTc1LTkuMTc1TDIwLjE1IDcuNHoiLz48L3N2Zz4=);
}
}
&[data-type="warning"],
&[data-type="caution"],
&[data-type="alert"],
&[data-type="notice"]
{
// background-color: hsl(50, 50%, 10%);
border-color: hsl(50, 75%, 40%);
&:before {
background-color: hsl(50, 75%, 40%);
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0yMzYuOCAxODguMDlMMTQ5LjM1IDM2LjIyYTI0Ljc2IDI0Ljc2IDAgMCAwLTQyLjcgMEwxOS4yIDE4OC4wOWEyMy41MSAyMy41MSAwIDAgMCAwIDIzLjcyQTI0LjM1IDI0LjM1IDAgMCAwIDQwLjU1IDIyNGgxNzQuOWEyNC4zNSAyNC4zNSAwIDAgMCAyMS4zMy0xMi4xOWEyMy41MSAyMy41MSAwIDAgMCAuMDItMjMuNzJNMTIwIDEwNGE4IDggMCAwIDEgMTYgMHY0MGE4IDggMCAwIDEtMTYgMFptOCA4OGExMiAxMiAwIDEgMSAxMi0xMmExMiAxMiAwIDAgMS0xMiAxMiIvPjwvc3ZnPg==);
}
}
&[data-type="danger"],
&[data-type="important"],
&[data-type="fail"],
&[data-type="failure"]
{
// background-color: hsl(0, 50%, 10%);
border-color: hsl(0, 50%, 50%);
&:before {
background-color: hsl(0, 50%, 50%);
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnIGZpbGw9Im5vbmUiIHN0cm9rZT0id2hpdGUiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIzIiBkPSJNMTMuMjUzIDUuOThMMTIgMTMuNWwtMS4yNTMtNy41MmExLjI3IDEuMjcgMCAxIDEgMi41MDYgMCIvPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTkiIHI9IjEiIHN0cm9rZS13aWR0aD0iMiIvPjwvZz48L3N2Zz4=);
}
}
}