mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-15 02:16:10 +00:00
fix(shortcode): allow for multiple child elements in Alerts
Previously, alerts were designed just for a single child consisting of a paragraph. Now supports styling of multiple children including lists. Fix #881
This commit is contained in:
1 parent
85a12b0ad7
commit
bc7e541f61
2 files changed
+14
-4
No files matched your search
@@ -1814,7 +1814,7 @@ table > tbody > tr:hover > th {
|
|||||||
* Alerts
|
* Alerts
|
||||||
**************************************************/
|
**************************************************/
|
||||||
|
|
||||||
div.alert p {
|
div.alert > div {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
@@ -1823,7 +1823,15 @@ div.alert p {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.alert p:first-child::before {
|
div.alert div > * {
|
||||||
|
margin-bottom: .5rem; /* Use smaller paragraph spacing than usual. */
|
||||||
|
}
|
||||||
|
|
||||||
|
div.alert div > :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.alert > div:first-child::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -0.5rem;
|
top: -0.5rem;
|
||||||
left: -2rem;
|
left: -2rem;
|
||||||
@@ -1836,7 +1844,7 @@ div.alert p:first-child::before {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.alert-warning p:first-child::before {
|
div.alert-warning > div:first-child::before {
|
||||||
font-family: 'Font Awesome 5 Free';
|
font-family: 'Font Awesome 5 Free';
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
color: #ff3860;
|
color: #ff3860;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
<div class="alert alert-{{ .Get 0 }}">
|
<div class="alert alert-{{ .Get 0 }}">
|
||||||
{{ .Inner }}
|
<div>
|
||||||
|
{{ .Inner }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user