|
4 | 4 | .slideshow-section .item:first-child { |
5 | 5 | display: block; |
6 | 6 | } |
| 7 | + |
| 8 | +/* For img-toggle shortcode */ |
| 9 | +.toggle-wrapper { |
| 10 | + border: 1px solid #1e293b; |
| 11 | + border-radius: 12px; |
| 12 | + overflow: hidden; |
| 13 | + margin: 1.5rem 0; |
| 14 | + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); |
| 15 | + width: 100%; |
| 16 | +} |
| 17 | + |
| 18 | +.toggle-input { display: none !important; } |
| 19 | + |
| 20 | +.tab-bar { |
| 21 | + display: grid; |
| 22 | + grid-template-columns: 1fr 1fr; |
| 23 | + border-bottom: 1px solid #1e293b; |
| 24 | + width: 100%; |
| 25 | +} |
| 26 | + |
| 27 | +.toggle-code-block .content-area pre.chroma { |
| 28 | + margin-top: 0 !important; |
| 29 | +} |
| 30 | + |
| 31 | +.tab { |
| 32 | + padding: 12px 0; |
| 33 | + text-align: center; |
| 34 | + font-size: 0.85rem; |
| 35 | + font-weight: 600; |
| 36 | + cursor: pointer; |
| 37 | + margin: 0; |
| 38 | + transition: all 0.2s ease; |
| 39 | +} |
| 40 | + |
| 41 | +.tab.active { |
| 42 | + cursor: default; |
| 43 | +} |
| 44 | + |
| 45 | +.content-area { |
| 46 | + display: block; |
| 47 | + cursor: pointer; |
| 48 | + margin: 0; |
| 49 | +} |
| 50 | + |
| 51 | +.toggle-image-block .content-area { |
| 52 | + padding: 1rem 2rem; |
| 53 | +} |
| 54 | + |
| 55 | +.content-area img { |
| 56 | + width: 100% !important; |
| 57 | + height: auto !important; |
| 58 | + display: block; |
| 59 | + border-radius: 4px; |
| 60 | +} |
| 61 | + |
| 62 | +.toggle-code-block { display: none !important; } |
| 63 | +.toggle-image-block { display: block !important; } |
| 64 | +.toggle-input:checked ~ .toggle-code-block { display: block !important; } |
| 65 | +.toggle-input:checked ~ .toggle-image-block { display: none !important; } |
| 66 | + |
| 67 | +.toggle-code-block code { |
| 68 | + white-space: pre-wrap !important; |
| 69 | + word-break: break-all; |
| 70 | +} |
| 71 | + |
| 72 | +.toggle-code-block pre { |
| 73 | + overflow-x: hidden !important; |
| 74 | +} |
| 75 | + |
| 76 | +:not(.dark .prose .chroma) .tab.inactive { |
| 77 | + background-color: rgb(229 229 229); |
| 78 | +} |
| 79 | +:is(.dark .prose .chroma) .tab.inactive { |
| 80 | + background-color: rgb(51 65 85); |
| 81 | + filter: brightness(0.8); |
| 82 | +} |
| 83 | + |
| 84 | +/* To fix text overflow in tables */ |
| 85 | +table td { |
| 86 | + overflow-wrap: break-word; |
| 87 | +} |
| 88 | + |
| 89 | +table td code { |
| 90 | + overflow-wrap: anywhere; |
| 91 | +} |
| 92 | + |
| 93 | +/* Simplification of the table of contents */ |
| 94 | +nav.hb-toc ul li:has(a.pl-8), nav.hb-toc ul li:has(a.pl-12), nav.hb-toc ul li:has(a.pl-16) { |
| 95 | + display: none; |
| 96 | +} |
| 97 | + |
| 98 | +nav.hb-toc ul li a.pl-8, nav.hb-toc ul li a.pl-12, nav.hb-toc ul li a.pl-16 { |
| 99 | + display: none; |
| 100 | +} |
| 101 | + |
| 102 | +/* Locate the table of content to the left (only needed for big screens after that is hidden */ |
| 103 | +@media (min-width: 1279px) { |
| 104 | + .mx-auto.flex.max-w-screen-xl:has(nav.hb-toc) { |
| 105 | + flex-direction: row-reverse; |
| 106 | + } |
| 107 | +} |
| 108 | + |
| 109 | +/* Align the header navbar with the content in bigger screens */ |
| 110 | +@media (min-width: 1279px) { |
| 111 | + header.header > nav.navbar { |
| 112 | + max-width: 1280px; |
| 113 | + margin-left: auto; |
| 114 | + margin-right: auto; |
| 115 | + } |
| 116 | +} |
| 117 | + |
7 | 118 | /* ...existing code... */ |
0 commit comments