|
209 | 209 | .toc__item { |
210 | 210 | .btnFold { |
211 | 211 | position: absolute; |
212 | | - left: 6px; |
| 212 | + left: 12px; |
213 | 213 | top: 50%; |
214 | 214 | transform: translateY(-50%); |
215 | 215 | display: flex; |
|
256 | 256 | // ====================== |
257 | 257 | .toc-drag-handle { |
258 | 258 | position: absolute; |
259 | | - left: -8px; |
| 259 | + left: 6px; |
260 | 260 | top: 50%; |
261 | | - transform: translateY(-50%) translateX(4px); |
| 261 | + transform: translateY(-50%) translateX(-8px) scale(0.85); |
262 | 262 | display: flex; |
263 | 263 | align-items: center; |
264 | 264 | justify-content: center; |
265 | | - width: 20px; |
266 | | - height: 20px; |
| 265 | + width: 16px; |
| 266 | + height: 18px; |
267 | 267 | opacity: 0; |
268 | 268 | cursor: grab; |
269 | | - color: #9ca3af; |
270 | | - transition: all 0.15s ease; |
271 | | - border-radius: 4px; |
272 | | - z-index: 2; |
| 269 | + color: #a1a1aa; |
| 270 | + background: linear-gradient(to bottom, #fafafa, #f4f4f5); |
| 271 | + border: 1px solid rgba(0, 0, 0, 0.06); |
| 272 | + border-radius: 3px; |
| 273 | + box-shadow: |
| 274 | + 0 1px 2px rgba(0, 0, 0, 0.04), |
| 275 | + inset 0 1px 0 rgba(255, 255, 255, 0.8); |
| 276 | + transition: |
| 277 | + opacity 0.18s ease-out, |
| 278 | + transform 0.18s ease-out, |
| 279 | + color 0.12s ease, |
| 280 | + background 0.12s ease, |
| 281 | + border-color 0.12s ease, |
| 282 | + box-shadow 0.12s ease; |
| 283 | + z-index: 10; |
273 | 284 |
|
274 | 285 | &:hover { |
275 | | - color: #6b7280; |
276 | | - background-color: #f3f4f6; |
| 286 | + color: #71717a; |
| 287 | + background: linear-gradient(to bottom, #f4f4f5, #e4e4e7); |
| 288 | + border-color: rgba(0, 0, 0, 0.1); |
| 289 | + box-shadow: |
| 290 | + 0 2px 4px rgba(0, 0, 0, 0.08), |
| 291 | + inset 0 1px 0 rgba(255, 255, 255, 0.6); |
| 292 | + transform: translateY(-50%) translateX(-10px) scale(1.08); |
277 | 293 | } |
278 | 294 |
|
279 | 295 | &:active { |
280 | 296 | cursor: grabbing; |
| 297 | + color: var(--color-docsy); |
| 298 | + background: linear-gradient(to bottom, #e4e4e7, #d4d4d8); |
| 299 | + border-color: color-mix(in srgb, var(--color-docsy) 30%, transparent); |
| 300 | + box-shadow: |
| 301 | + 0 1px 1px rgba(0, 0, 0, 0.06), |
| 302 | + inset 0 1px 2px rgba(0, 0, 0, 0.08); |
| 303 | + transform: translateY(-50%) translateX(-10px) scale(0.95); |
| 304 | + transition-duration: 0.05s; |
281 | 305 | } |
282 | 306 | } |
283 | 307 |
|
284 | | - // Show drag handle on hover |
| 308 | + // Fade + slide in on item hover |
285 | 309 | .toc__item:hover > a > .toc-drag-handle { |
286 | 310 | opacity: 0.7; |
287 | | - transform: translateY(-50%) translateX(0); |
| 311 | + transform: translateY(-50%) translateX(-10px) scale(1.18); |
288 | 312 | } |
289 | 313 |
|
290 | | - // Increase opacity on direct hover |
291 | | - .toc__item > a:hover > .toc-drag-handle { |
| 314 | + // Full visibility on direct hover |
| 315 | + .toc__item > a:hover > .toc-drag-handle, |
| 316 | + .toc-drag-handle:hover { |
292 | 317 | opacity: 1; |
293 | | - transform: translateY(-50%) translateX(-2px); |
294 | 318 | } |
295 | 319 |
|
296 | 320 | // Links with drag handle need extra left padding |
297 | 321 | .toc__item > a.has-drag-handle { |
298 | | - padding-left: 32px !important; |
| 322 | + padding-left: 36px !important; |
299 | 323 | } |
300 | 324 |
|
301 | 325 | // Ghosted state for items during drag |
|
0 commit comments