|
| 1 | +:root { |
| 2 | + --md-admonition-icon--heart: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23fff" d="M462.3 62.6c-54.5-46.4-136-38.3-186.4 13.7L256 96l-19.9-19.7C185.7 24.3 104.2 16.2 49.7 62.6c-62.8 53.5-66.1 149.8-9.9 207.4l193.5 199.8c12 12.4 31.5 12.4 43.5 0l193.5-199.8c56.2-57.6 52.9-153.9-9.9-207.4z"/></svg>'); |
| 3 | +} |
| 4 | + |
| 5 | +/*************************** |
| 6 | +Heart Admonition Definition |
| 7 | +***************************/ |
| 8 | + |
| 9 | +/* Heart Admonition Container */ |
| 10 | +.md-typeset .admonition.heart, |
| 11 | +.md-typeset details.heart { |
| 12 | + border-color: rgb(200, 50, 70); |
| 13 | + background-color: rgba(0, 0 ,0, 0); /* transparent */ |
| 14 | +} |
| 15 | + |
| 16 | +/* Title background */ |
| 17 | +.md-typeset .heart > .admonition-title, |
| 18 | +.md-typeset .heart > summary { |
| 19 | + background-color: rgba(200, 50, 70, 0.08); |
| 20 | + border-top-left-radius: 0.5rem; |
| 21 | + border-top-right-radius: 0.5rem; |
| 22 | +} |
| 23 | + |
| 24 | +/* Icon styling */ |
| 25 | +.md-typeset .heart > .admonition-title::before, |
| 26 | +.md-typeset .heart > summary::before { |
| 27 | + background-color: rgb(200, 50, 70); |
| 28 | + -webkit-mask-image: var(--md-admonition-icon--heart); |
| 29 | + mask-image: var(--md-admonition-icon--heart); |
| 30 | +} |
| 31 | + |
| 32 | +/* Optional — subtle hover effect for the title when open */ |
| 33 | +.md-typeset details.heart[open] > summary:hover { |
| 34 | + background-color: rgba(200, 50, 70, 0.12); |
| 35 | + transition: background-color 0.2s ease-in-out; |
| 36 | +} |
| 37 | + |
| 38 | +/* Optional — slightly rounder border and shadow for elegance */ |
| 39 | +.md-typeset .admonition.heart, |
| 40 | +.md-typeset details.heart { |
| 41 | + border-radius: 0.5rem; |
| 42 | + box-shadow: 0 1px 3px rgba(200, 50, 70, 0.15); |
| 43 | +} |
| 44 | + |
| 45 | + |
| 46 | +/************************************** |
| 47 | +Collapsible Admonitions for Procedures |
| 48 | +**************************************/ |
| 49 | + |
| 50 | +.md-typeset .admonition.nodeco, |
| 51 | +.md-typeset details.nodeco { |
| 52 | + background-color: var(--md-default-bg-color); |
| 53 | + box-shadow: none; |
| 54 | + border: none; |
| 55 | + border-left: 0; |
| 56 | + font-size: medium; |
| 57 | + font-weight: lighter; |
| 58 | + margin: 0 0 0 0; |
| 59 | +} |
| 60 | + |
| 61 | +.md-typeset .nodeco > .admonition-title, |
| 62 | +.md-typeset .nodeco > summary { |
| 63 | + background-color: var(--md-default-bg-color); |
| 64 | + padding: 0 0 0 0; |
| 65 | + border-left: 0; |
| 66 | + margin: 0 0 0 -0.5rem; |
| 67 | + font-weight: normal; |
| 68 | + font-size: 0.8rem; |
| 69 | + padding-left: 0.2rem !important; |
| 70 | +} |
| 71 | + |
| 72 | +.md-typeset .nodeco > summary code { |
| 73 | + background-color: var(--md-code-bg-color); |
| 74 | +} |
| 75 | + |
| 76 | +/* margin for the element after <summary> which is the first child */ |
| 77 | +.md-typeset .nodeco > :nth-child(2) { |
| 78 | + margin: 0.3rem 1.5rem 0 0; |
| 79 | +} |
| 80 | + |
| 81 | +.md-typeset .nodeco > p, |
| 82 | +.md-typeset .nodeco > ul, |
| 83 | +.md-typeset .nodeco > figure { |
| 84 | + background-color: var(--md-default-bg-color); |
| 85 | + padding: 0.2rem 0 0 0.5rem; |
| 86 | + margin: 0 1.5rem 0 0 !important; |
| 87 | + font-weight: lighter; |
| 88 | + border-left: .2rem solid var(--md-default-fg-color--lighter); |
| 89 | +} |
| 90 | + |
| 91 | +.md-typeset .nodeco .leftFigure, |
| 92 | +.md-typeset .nodeco .rightFigure { |
| 93 | + width:45%; |
| 94 | + margin: 0 0 0 0; |
| 95 | + display: inline-block; |
| 96 | +} |
| 97 | + |
| 98 | +.md-typeset .nodeco .rightFigure { |
| 99 | + padding: 0 0.2rem 0 0.5rem; |
| 100 | + margin: 0 1.5rem 0 0; |
| 101 | + border-left: none; |
| 102 | +} |
| 103 | + |
| 104 | +.md-typeset .nodeco > .admonition-title::before, |
| 105 | +.md-typeset .nodeco > summary::before { |
| 106 | + height: 0; /* hides icon */ |
| 107 | + margin: 0 0 0 0; |
| 108 | + |
| 109 | +} |
| 110 | + |
| 111 | +/************************************** |
| 112 | +Specific style for Warning Admonitions |
| 113 | +**************************************/ |
| 114 | +.md-typeset .admonition.warning { |
| 115 | + font-size: 0.74rem !important; /* make warning text larger, default: 0.64 */ |
| 116 | +} |
0 commit comments