My Blog, build with Norgolith blog.ladas552.me
blog
at main 127 lines 2.4 kB view raw
1/* Catppuccin Macchiato Color Palette */ 2:root { 3 --base: #24273A; 4 --mantle: #1E2030; 5 --surface0: #363A4F; 6 --rosewater: #F4DBD6; 7 --peach: #F5A97F; 8 --text: #c9d1d9; 9 --lavender: #B7BDF8; 10 --shadow: 0 8px 16px rgba(0, 0, 0, 0.15); 11} 12 13/* Hide checkbox */ 14#toc-toggle { 15 display: none; 16} 17 18/* Button Styling */ 19.toc-button { 20 position: fixed; 21 right: 15px; 22 top: 15%; 23 transform: translateY(0); 24 background: var(--mantle); 25 width: 36px; 26 height: 36px; 27 border-radius: 6px; 28 display: flex; 29 align-items: center; 30 justify-content: center; 31 cursor: pointer; 32 transition: background 0.2s ease, right 0.2s ease; 33 z-index: 1000; 34 box-shadow: var(--shadow); 35} 36 37.toc-button:hover { 38 background: var(--surface0); 39} 40 41.toc-button::before { 42 content: "➤"; 43 font-size: 18px; 44 color: var(--rosewater); 45 transform: rotate(180deg); 46 transition: transform 0.2s ease; 47} 48 49#toc-toggle:checked ~ .toc-button::before { 50 transform: rotate(0deg); 51} 52 53#toc-toggle:checked ~ .toc-button { 54 right: 375px; 55} 56 57/* Table of Contents Panel */ 58.toc-panel { 59 position: fixed; 60 right: -360px; 61 top: 15%; 62 height: auto; 63 width: 360px; 64 background: var(--mantle); 65 border-radius: 8px; 66 border: 1px solid var(--surface0); 67 box-shadow: var(--shadow); 68 transition: transform 0.2s ease; 69 z-index: 999; 70 overflow-y: visible; 71} 72 73#toc-toggle:checked ~ .toc-panel { 74 transform: translateX(-360px); 75} 76 77/* Unordered List Styling */ 78.toc-content ul { 79 list-style-type: none; 80 padding: 0; 81 margin: 0; 82} 83 84.toc-content li { 85 padding-left: 0.25rem; /* Single whitespace indentation */ 86 padding-top: 0.25rem; 87 margin-bottom: 0.25rem; 88} 89 90.toc-content ul ul { 91 padding-left: 0.5rem; /* Double whitespace for nested levels */ 92} 93 94.toc-content ul ul ul { 95 padding-left: 0.75rem; /* Triple whitespace for deeper nesting */ 96} 97 98/* Links Styling */ 99.toc-content a[href] { 100 display: block; 101 padding: 0.5rem 1rem; 102 border-radius: 4px; 103 transition: background 0.2s ease, color 0.2s ease; 104 white-space: nowrap; 105 overflow: hidden; 106 text-overflow: ellipsis; 107 max-width: 100%; 108} 109 110.toc-content a[href]:hover { 111 background: var(--surface0); 112} 113 114/* Responsive Design */ 115@media (max-width: 842px) { 116 .toc-button { 117 display: none; /* Hide button on small screens */ 118 } 119 120 .toc-panel { 121 display: none; /* Hide panel on small screens */ 122 } 123 124 .overlay { 125 display: none; /* Hide overlay on small screens */ 126 } 127}