|
| 1 | +:root { |
| 2 | + --active-bg: rgba(0, 0, 0, .05); |
| 3 | +} |
| 4 | +@supports (color-scheme: light dark) { |
| 5 | + @media (prefers-color-scheme: dark) { |
| 6 | + :root { |
| 7 | + --active-bg: rgba(255, 255, 255, .1); |
| 8 | + } |
| 9 | + } |
| 10 | +} |
| 11 | +html { |
| 12 | + height: 100%; |
| 13 | +} |
| 14 | +body { |
| 15 | + margin: 0 auto; |
| 16 | + height: 100%; |
| 17 | + font: menu; |
| 18 | + font-family: system-ui, sans-serif; |
| 19 | +} |
| 20 | +#spinner-container { |
| 21 | + height: 100vh; |
| 22 | + display: flex; |
| 23 | + align-items: center; |
| 24 | + justify-content: center; |
| 25 | + text-align: center; |
| 26 | +} |
| 27 | +.icon { |
| 28 | + display: block; |
| 29 | + fill: none; |
| 30 | + stroke: currentcolor; |
| 31 | + stroke-width: 2px; |
| 32 | +} |
| 33 | +.empty-state-icon { |
| 34 | + margin: auto; |
| 35 | +} |
| 36 | +.toolbar { |
| 37 | + box-sizing: border-box; |
| 38 | + position: absolute; |
| 39 | + z-index: 1; |
| 40 | + display: flex; |
| 41 | + align-items: center; |
| 42 | + justify-content: space-between; |
| 43 | + width: 100%; |
| 44 | + height: 48px; |
| 45 | + padding: 6px; |
| 46 | + transition: opacity 250ms ease; |
| 47 | + visibility: hidden; |
| 48 | +} |
| 49 | +.toolbar button { |
| 50 | + padding: 3px; |
| 51 | + border-radius: 6px; |
| 52 | + background: none; |
| 53 | + border: 0; |
| 54 | + color: GrayText; |
| 55 | +} |
| 56 | +.toolbar button:hover { |
| 57 | + background: rgba(0, 0, 0, .1); |
| 58 | + color: currentcolor; |
| 59 | +} |
| 60 | +#header-bar { |
| 61 | + top: 0; |
| 62 | +} |
| 63 | +#nav-bar { |
| 64 | + bottom: 0; |
| 65 | +} |
| 66 | +#progress-slider { |
| 67 | + flex-grow: 1; |
| 68 | + margin: 0 12px; |
| 69 | + visibility: hidden; |
| 70 | +} |
| 71 | +#side-bar { |
| 72 | + visibility: hidden; |
| 73 | + box-sizing: border-box; |
| 74 | + position: absolute; |
| 75 | + z-index: 2; |
| 76 | + top: 0; |
| 77 | + left: 0; |
| 78 | + height: 100%; |
| 79 | + width: 320px; |
| 80 | + transform: translateX(-320px); |
| 81 | + display: flex; |
| 82 | + flex-direction: column; |
| 83 | + background: Canvas; |
| 84 | + color: CanvasText; |
| 85 | + box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 40px rgba(0, 0, 0, .2); |
| 86 | + transition: visibility 0s linear 300ms, transform 300ms ease; |
| 87 | +} |
| 88 | +#side-bar.show { |
| 89 | + visibility: visible; |
| 90 | + transform: translateX(0); |
| 91 | + transition-delay: 0s; |
| 92 | +} |
| 93 | +#dimming-overlay { |
| 94 | + visibility: hidden; |
| 95 | + position: fixed; |
| 96 | + z-index: 2; |
| 97 | + top: 0; |
| 98 | + left: 0; |
| 99 | + width: 100%; |
| 100 | + height: 100%; |
| 101 | + background: rgba(0, 0, 0, .2); |
| 102 | + opacity: 0; |
| 103 | + transition: visibility 0s linear 300ms, opacity 300ms ease; |
| 104 | +} |
| 105 | +#dimming-overlay.show { |
| 106 | + visibility: visible; |
| 107 | + opacity: 1; |
| 108 | + transition-delay: 0s; |
| 109 | +} |
| 110 | +#side-bar-header { |
| 111 | + padding: 1rem; |
| 112 | + display: flex; |
| 113 | + border-bottom: 1px solid rgba(0, 0, 0, .1); |
| 114 | + align-items: center; |
| 115 | +} |
| 116 | +#side-bar-cover { |
| 117 | + height: 10vh; |
| 118 | + min-height: 60px; |
| 119 | + max-height: 180px; |
| 120 | + border-radius: 3px; |
| 121 | + border: 0; |
| 122 | + background: lightgray; |
| 123 | + box-shadow: 0 0 1px rgba(0, 0, 0, .1), 0 0 16px rgba(0, 0, 0, .1); |
| 124 | + margin-inline-end: 1rem; |
| 125 | +} |
| 126 | +#side-bar-cover:not([src]) { |
| 127 | + display: none; |
| 128 | +} |
| 129 | +#side-bar-title { |
| 130 | + margin: .5rem 0; |
| 131 | + font-size: inherit; |
| 132 | +} |
| 133 | +#side-bar-author { |
| 134 | + margin: .5rem 0; |
| 135 | + font-size: small; |
| 136 | + color: GrayText; |
| 137 | +} |
| 138 | +#toc-view { |
| 139 | + padding: .5rem; |
| 140 | + overflow-y: scroll; |
| 141 | +} |
| 142 | +#toc-view li, #toc-view ol { |
| 143 | + margin: 0; |
| 144 | + padding: 0; |
| 145 | + list-style: none; |
| 146 | +} |
| 147 | +#toc-view a, #toc-view span { |
| 148 | + display: block; |
| 149 | + border-radius: 6px; |
| 150 | + padding: 8px; |
| 151 | + margin: 2px 0; |
| 152 | +} |
| 153 | +#side-bar a { |
| 154 | + color: CanvasText; |
| 155 | + text-decoration: none; |
| 156 | +} |
| 157 | +#toc-view a:hover { |
| 158 | + background: var(--active-bg); |
| 159 | +} |
| 160 | +#toc-view span { |
| 161 | + color: GrayText; |
| 162 | +} |
| 163 | +#toc-view svg { |
| 164 | + margin-inline-start: -24px; |
| 165 | + padding-inline-start: 5px; |
| 166 | + padding-inline-end: 6px; |
| 167 | + fill: CanvasText; |
| 168 | + cursor: default; |
| 169 | + transition: transform .2s ease; |
| 170 | + opacity: .5; |
| 171 | +} |
| 172 | +#toc-view svg:hover { |
| 173 | + opacity: 1; |
| 174 | +} |
| 175 | +#toc-view [aria-current] { |
| 176 | + font-weight: bold; |
| 177 | + background: var(--active-bg); |
| 178 | +} |
| 179 | +#toc-view [aria-expanded="false"] svg { |
| 180 | + transform: rotate(-90deg); |
| 181 | +} |
| 182 | +#toc-view [aria-expanded="false"] + [role="group"] { |
| 183 | + display: none; |
| 184 | +} |
| 185 | +.menu-container { |
| 186 | + position: relative; |
| 187 | +} |
| 188 | +.menu, .menu ul { |
| 189 | + list-style: none; |
| 190 | + padding: 0; |
| 191 | + margin: 0; |
| 192 | +} |
| 193 | +.menu { |
| 194 | + visibility: hidden; |
| 195 | + position: absolute; |
| 196 | + right: 0; |
| 197 | + background: Canvas; |
| 198 | + color: CanvasText; |
| 199 | + border-radius: 6px; |
| 200 | + box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 16px rgba(0, 0, 0, .1); |
| 201 | + padding: 6px; |
| 202 | + cursor: default; |
| 203 | +} |
| 204 | +.menu.show { |
| 205 | + visibility: visible; |
| 206 | +} |
| 207 | +.menu li { |
| 208 | + padding: 6px 12px; |
| 209 | + padding-left: 24px; |
| 210 | + border-radius: 6px; |
| 211 | +} |
| 212 | +.menu li:hover { |
| 213 | + background: var(--active-bg); |
| 214 | +} |
| 215 | +.menu li[aria-checked="true"] { |
| 216 | + background-position: center left; |
| 217 | + background-repeat: no-repeat; |
| 218 | + background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E'); |
| 219 | +} |
| 220 | +.popover { |
| 221 | + background: Canvas; |
| 222 | + color: CanvasText; |
| 223 | + border-radius: 6px; |
| 224 | + box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 16px rgba(0, 0, 0, .1), 0 0 32px rgba(0, 0, 0, .1); |
| 225 | +} |
| 226 | +.popover-arrow-down { |
| 227 | + fill: Canvas; |
| 228 | + filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .2)); |
| 229 | +} |
| 230 | +.popover-arrow-up { |
| 231 | + fill: Canvas; |
| 232 | + filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .2)); |
| 233 | +} |
0 commit comments