resources/web/style/admonishment.pcss (96 lines of code) (raw):
#guide {
.Admonishment {
position: relative;
&:hover {
color: black;
transition: all 0.3s ease;
.Admonishment-detail {
z-index: 10000;
left: -5em;
opacity: 1;
color: #555;
transition: color 0.5s ease;
}
}
&-title, &-version {
font-size: 0.8em;
border-bottom: 1px dashed #00a9e5;
}
&-detail {
min-width: 250px;
position: absolute;
padding: 15px;
border: 3px solid #e8e8e8;
background: white;
opacity: 0;
color: white;
left: -20000px;
bottom: 20px;
line-height: 1.2em;
}
}
.admon {
font-weight: normal;
background: #fbfbfb;
padding: 10px;
min-height: 70px;
margin: 15px 0 24px;
position: relative;
.icon {
/*
* The icon is centered horizontally on the left of the admonition text
* with some text centered below it.
*/
left: -2px;
top: 18px;
width: 100px;
height: 24px;
position: absolute;
background-repeat: no-repeat;
background-size: contain;
background-position: 50% 20%;
&::after {
position: absolute;
top: 24px;
width: 100px;
text-align: center;
font-weight: bold;
font-size: 12px;
}
}
&.caution .icon {
background-image: inline("img/warning.svg");
&::after { content: "CAUTION"; }
}
&.important .icon {
background-image: inline("img/important.svg");
&::after { content: "IMPORTANT"; }
}
&.note .icon {
background-image: inline("img/note.svg");
&::after { content: "NOTE"; }
}
&.tip .icon {
background-image: inline("img/tip.svg");
&::after { content: "TIP"; }
}
&.warning .icon {
background-image: inline("img/warning.svg");
&::after { content: "WARNING"; }
}
}
.admon_content {
margin-left: 100px;
/* On page load, the heading level may be changed,
but we always what to style it the same way */
.admon_title {
font-size: 16px;
margin-bottom: 4px;
font-weight: 700;
a { font-weight: 700; }
}
p:last-of-type {
margin-bottom: 0em;
}
}
}