|
| 1 | +/* Maintain resize cursor while dragging */ |
| 2 | +/* stylelint-disable-next-line selector-no-qualifying-type */ |
| 3 | +body[data-page-layout-dragging='true'] { |
| 4 | + cursor: col-resize; |
| 5 | +} |
| 6 | + |
| 7 | +/* Disable text selection while dragging */ |
| 8 | +/* stylelint-disable-next-line selector-no-qualifying-type */ |
| 9 | +body[data-page-layout-dragging='true'] * { |
| 10 | + user-select: none; |
| 11 | +} |
| 12 | + |
1 | 13 | .PageLayoutRoot { |
2 | 14 | /* Region Order */ |
3 | 15 | --region-order-header: 0; |
|
371 | 383 | } |
372 | 384 | } |
373 | 385 |
|
374 | | -/** |
375 | | - * OPTIMIZATION: Aggressive containment during drag for ContentWrapper |
376 | | - * CSS handles most optimizations automatically via :has() selector |
377 | | - * JavaScript only handles scroll locking (can't be done in CSS) |
378 | | - */ |
379 | | -.PageLayoutContent:has(.DraggableHandle[data-dragging='true']) .ContentWrapper { |
380 | | - /* Add paint containment during drag - safe since user can't interact */ |
381 | | - contain: layout style paint; |
382 | | - |
383 | | - /* Disable interactions */ |
384 | | - pointer-events: none; |
385 | | - |
386 | | - /* Disable transitions to prevent expensive recalculations */ |
387 | | - transition: none; |
388 | | - |
389 | | - /* Force compositor layer for hardware acceleration */ |
390 | | - will-change: width; |
391 | | - transform: translateZ(0); |
392 | | -} |
393 | | - |
394 | 386 | .Content { |
395 | 387 | width: 100%; |
396 | 388 |
|
|
417 | 409 | } |
418 | 410 | } |
419 | 411 |
|
420 | | -/** |
421 | | - * OPTIMIZATION: Freeze content layout during resize drag |
422 | | - * This prevents expensive recalculations of large content areas |
423 | | - * while keeping content visible (just frozen in place) |
424 | | - */ |
425 | | -.PageLayoutContent:has(.DraggableHandle[data-dragging='true']) .Content { |
426 | | - /* Full containment (without size) - isolate from layout recalculations */ |
427 | | - contain: layout style paint; |
428 | | -} |
429 | | - |
430 | 412 | .PaneWrapper { |
431 | 413 | display: flex; |
432 | 414 | width: 100%; |
|
616 | 598 | } |
617 | 599 | } |
618 | 600 |
|
619 | | -/** |
620 | | - * OPTIMIZATION: Performance enhancements for Pane during drag |
621 | | - * CSS handles all optimizations automatically - JavaScript only locks scroll |
622 | | - */ |
623 | | -.PaneWrapper:has(.DraggableHandle[data-dragging='true']) .Pane { |
624 | | - /* Full containment - isolate from layout recalculations */ |
625 | | - contain: layout style paint; |
626 | | - |
627 | | - /* Disable interactions during drag */ |
628 | | - pointer-events: none; |
629 | | - |
630 | | - /* Disable transitions during drag */ |
631 | | - transition: none; |
632 | | - |
633 | | - /* Force hardware acceleration */ |
634 | | - will-change: width, transform; |
635 | | - transform: translateZ(0); |
636 | | - backface-visibility: hidden; |
637 | | -} |
638 | | - |
639 | 601 | .PaneHorizontalDivider { |
640 | 602 | &:where([data-position='start']) { |
641 | 603 | /* stylelint-disable-next-line primer/spacing */ |
|
734 | 696 | padding: var(--spacing); |
735 | 697 | } |
736 | 698 |
|
737 | | -/** |
738 | | - * DraggableHandle - Interactive resize handle |
739 | | - */ |
740 | 699 | .DraggableHandle { |
741 | 700 | position: absolute; |
742 | 701 | inset: 0 -2px; |
743 | 702 | cursor: col-resize; |
744 | 703 | background-color: transparent; |
745 | 704 | transition-delay: 0.1s; |
746 | | - |
747 | | - /** |
748 | | - * OPTIMIZATION: Prevent touch scrolling and text selection during drag |
749 | | - * This is done in CSS because it needs to be set before any pointer events |
750 | | - */ |
751 | | - touch-action: none; |
752 | | - user-select: none; |
753 | 705 | } |
754 | 706 |
|
755 | 707 | .DraggableHandle:hover { |
|
758 | 710 |
|
759 | 711 | .DraggableHandle[data-dragging='true'] { |
760 | 712 | background-color: var(--bgColor-accent-emphasis); |
761 | | - cursor: col-resize; |
762 | 713 | } |
763 | 714 |
|
764 | 715 | .DraggableHandle[data-dragging='true']:hover { |
|
0 commit comments