|
| 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 | +} |
| 14 | + |
| 15 | +/* Title background */ |
| 16 | +.md-typeset .heart > .admonition-title, |
| 17 | +.md-typeset .heart > summary { |
| 18 | + background-color: rgba(200, 50, 70, 0.08); |
| 19 | +} |
| 20 | + |
| 21 | +/* Icon styling */ |
| 22 | +.md-typeset .heart > .admonition-title::before, |
| 23 | +.md-typeset .heart > summary::before { |
| 24 | + background-color: rgb(200, 50, 70); |
| 25 | + -webkit-mask-image: var(--md-admonition-icon--heart); |
| 26 | + mask-image: var(--md-admonition-icon--heart); |
| 27 | +} |
| 28 | + |
| 29 | +/* Optional — subtle hover effect for the title when open */ |
| 30 | +.md-typeset details.heart[open] > summary:hover { |
| 31 | + background-color: rgba(200, 50, 70, 0.12); |
| 32 | + transition: background-color 0.2s ease-in-out; |
| 33 | +} |
| 34 | + |
| 35 | +/* Optional — slightly rounder border and shadow for elegance */ |
| 36 | +.md-typeset .admonition.heart, |
| 37 | +.md-typeset details.heart { |
| 38 | + border-radius: 0.5rem; |
| 39 | + box-shadow: 0 1px 3px rgba(200, 50, 70, 0.15); |
| 40 | +} |
| 41 | + |
| 42 | + |
| 43 | +/************************************** |
| 44 | +Collapsible Admonitions for Procedures |
| 45 | +**************************************/ |
| 46 | + |
| 47 | +.md-typeset .admonition.nodeco, |
| 48 | +.md-typeset details.nodeco { |
| 49 | + background-color: var(--md-default-bg-color); |
| 50 | + box-shadow: none; |
| 51 | + border: none; |
| 52 | + border-left: 0; |
| 53 | + font-size: medium; |
| 54 | + font-weight: lighter; |
| 55 | + margin: 0 0 0 0; |
| 56 | +} |
| 57 | + |
| 58 | +.md-typeset .nodeco > .admonition-title, |
| 59 | +.md-typeset .nodeco > summary { |
| 60 | + background-color: var(--md-default-bg-color); |
| 61 | + padding: 0 0 0 0; |
| 62 | + border-left: 0; |
| 63 | + margin: 0 0 0 -0.5rem; |
| 64 | + font-weight: normal; |
| 65 | + font-size: 0.8rem; |
| 66 | + padding-left: 0.2rem !important; |
| 67 | +} |
| 68 | + |
| 69 | +.md-typeset .nodeco > summary code { |
| 70 | + background-color: var(--md-code-bg-color); |
| 71 | +} |
| 72 | + |
| 73 | +/* margin for the element after <summary> which is the first child */ |
| 74 | +.md-typeset .nodeco > :nth-child(2) { |
| 75 | + margin: 0.3rem 1.5rem 0 0; |
| 76 | +} |
| 77 | + |
| 78 | +.md-typeset .nodeco > p, |
| 79 | +.md-typeset .nodeco > ul, |
| 80 | +.md-typeset .nodeco > figure { |
| 81 | + background-color: var(--md-default-bg-color); |
| 82 | + padding: 0.2rem 0 0 0.5rem; |
| 83 | + margin: 0 1.5rem 0 0 !important; |
| 84 | + font-weight: lighter; |
| 85 | + border-left: .2rem solid var(--md-default-fg-color--lighter); |
| 86 | +} |
| 87 | + |
| 88 | +.md-typeset .nodeco .leftFigure, |
| 89 | +.md-typeset .nodeco .rightFigure { |
| 90 | + width:45%; |
| 91 | + margin: 0 0 0 0; |
| 92 | + display: inline-block; |
| 93 | +} |
| 94 | + |
| 95 | +.md-typeset .nodeco .rightFigure { |
| 96 | + padding: 0 0.2rem 0 0.5rem; |
| 97 | + margin: 0 1.5rem 0 0; |
| 98 | + border-left: none; |
| 99 | +} |
| 100 | + |
| 101 | +.md-typeset .nodeco > .admonition-title::before, |
| 102 | +.md-typeset .nodeco > summary::before { |
| 103 | + height: 0; /* hides icon */ |
| 104 | + margin: 0 0 0 0; |
| 105 | + |
| 106 | +} |
| 107 | + |
| 108 | +/************************************** |
| 109 | +Specific style for Warning Admonitions |
| 110 | +**************************************/ |
| 111 | +.md-typeset .admonition.warning { |
| 112 | + font-size: 0.74rem !important; /* make warning text larger, default: 0.64 */ |
| 113 | +} |
0 commit comments