Repository navigation
Commit 955a23a
committed
Pin the header and title bar to the viewport while a wide table scrolls
On a wide index table the whole page scrolls horizontally. Pin #header and
#title_bar to the viewport's left edge and cap them to the viewport width, so
the logo, nav, page title AND action buttons all stay visible while the table
scrolls underneath (no `top`, so they still scroll vertically). #titlebar_right
resets to static — the bar does the pinning now, not the buttons.
Width is min(100vw - var(--scrollbar-width), 100%): plain 100vw includes the
vertical scrollbar gutter and shifts the left-pinned bars at the far-right
scroll position. The optional wigu/scrollbar_width.js sets --scrollbar-width;
without it the var falls back to 0 (plain 100vw). Consuming apps each solved
this with their own CSS (scroll_buttons_init.scss, title_bar overrides) and JS
— this owns it for all of them.1 parent e93a418 commit 955a23a
6 files changed
Lines changed: 98 additions & 2 deletions
File tree
- app/assets
- javascripts/wigu
- stylesheets/wigu
- img
- test/dummy/app
- admin
- assets/javascripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
| |||
657 | 662 | | |
658 | 663 | | |
659 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
660 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
661 | 691 | | |
662 | 692 | | |
663 | 693 | | |
664 | | - | |
| 694 | + | |
| 695 | + | |
665 | 696 | | |
666 | 697 | | |
667 | 698 | | |
| |||
672 | 703 | | |
673 | 704 | | |
674 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
675 | 716 | | |
676 | 717 | | |
677 | 718 | | |
| |||
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
0 commit comments