|
85 | 85 | --code-copy-icon-height: 1rem;
|
86 | 86 | --code-copy-icon-width: 1rem;
|
87 | 87 | --breadcrumb-max-height: 54px;
|
88 |
| - --sidebar-margin: 24px; |
| 88 | + --sidebar-margin: 1.5rem; |
89 | 89 | --sidebar-line-box-side-length: 8px;
|
90 | 90 | --sidebar-line-box-top: 6px;
|
91 | 91 | --sidebar-line-box-left: 12px;
|
92 |
| - --sidebar-width: 24rem; |
| 92 | + --sidebar-width: 22rem; |
93 | 93 | --sidebar-line-width: 11.5px;
|
94 | 94 | --side-gutter-width: 20rem;
|
95 | 95 | --table-top-bottom-spacing: 1rem;
|
@@ -453,8 +453,10 @@ nav {
|
453 | 453 | .sidebar-layout {
|
454 | 454 | display: flex;
|
455 | 455 | flex-direction: column;
|
456 |
| - position: relative; |
457 | 456 | z-index: 2;
|
| 457 | + border-right: 1px solid var(--color-divider); |
| 458 | + min-height: 100vh; |
| 459 | + overflow-y: auto; |
458 | 460 | }
|
459 | 461 |
|
460 | 462 | #searchbox {
|
@@ -710,36 +712,8 @@ body:not(:has(.main-layout)) header atomic-search-interface {
|
710 | 712 | }
|
711 | 713 | }
|
712 | 714 |
|
713 |
| -/* MARK: Sidebar |
| 715 | +/* MARK: Product Selector |
714 | 716 | */
|
715 |
| -.sidebar { |
716 |
| - display: flex; |
717 |
| - flex-direction: column; |
718 |
| - width: 24rem; |
719 |
| - max-height: 100vh; |
720 |
| - position: sticky; |
721 |
| - top: 0; |
722 |
| - margin-top: -1rem; |
723 |
| - padding-top: 1rem; |
724 |
| -} |
725 |
| - |
726 |
| -.sidebar .product-selector-button { |
727 |
| - display: flex; |
728 |
| - align-items: center; |
729 |
| - justify-content: space-between; |
730 |
| - background-color: oklch(var(--color-brand)); |
731 |
| - color: var(--color-brand-100); |
732 |
| - border: none; |
733 |
| - font-size: 1.25rem; |
734 |
| - width: 100%; |
735 |
| - padding: 0.5rem 0.5rem 0.5rem 1rem; /* 1rem to vertically align with searchbar text */ |
736 |
| - cursor: pointer; |
737 |
| -} |
738 |
| - |
739 |
| -.sidebar .product-selector-button .selector-icon { |
740 |
| - height: 24px; |
741 |
| - width: 24px; |
742 |
| -} |
743 | 717 |
|
744 | 718 | .product-selector {
|
745 | 719 | display: none;
|
@@ -782,275 +756,79 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
|
782 | 756 | font-size: 1rem;
|
783 | 757 | }
|
784 | 758 |
|
785 |
| -/* Sidebar scroller */ |
786 |
| -.sidebar .scrollbar-container { |
787 |
| - width: 100%; |
788 |
| - max-height: 100vh; |
789 |
| - overflow: scroll; |
790 |
| - scrollbar-gutter: stable; |
791 |
| - scrollbar-width: none; |
792 |
| -} |
793 |
| - |
794 |
| -.sidebar .scrollbar-container:hover { |
795 |
| - overflow: auto; |
796 |
| -} |
| 759 | +/* MARK: Sidebar |
| 760 | +*/ |
797 | 761 |
|
798 |
| -.sidebar .sidebar-navigation { |
799 |
| - margin-left: var(--sidebar-margin); |
| 762 | +/* Reset/Renormalize lists to remove default browser styling */ |
| 763 | +.sidebar__container, |
| 764 | +.sidebar__container button, |
| 765 | +.sidebar__container ul, |
| 766 | +.sidebar__container li { |
| 767 | + margin: 0; |
| 768 | + padding: 0; |
| 769 | + list-style: none; |
| 770 | + font-weight: 400; |
| 771 | + font-size: 1rem; |
800 | 772 | }
|
801 | 773 |
|
802 |
| -/* removes the built in ul padding/margin */ |
803 |
| -.sidebar .sidebar-navigation ul { |
804 |
| - margin-left: 0; |
805 |
| - padding-left: 0; |
806 |
| - list-style-type: none; |
| 774 | +.sidebar__container button { |
| 775 | + padding: 0.25rem 0.75rem; |
807 | 776 | }
|
808 | 777 |
|
809 |
| -.sidebar ul :not(.sidebar-navigation) ul { |
810 |
| - padding-left: 16px; |
| 778 | +.sidebar__content { |
| 779 | + padding: 0.5rem 0 0.4rem 0; |
811 | 780 | }
|
812 | 781 |
|
813 |
| -.sidebar .sidebar-navigation li { |
814 |
| - margin-bottom: 16px; |
| 782 | +.sidebar__ul { |
| 783 | + padding-left: 0; |
815 | 784 | }
|
816 | 785 |
|
817 |
| -.sidebar .sidebar-navigation a { |
818 |
| - text-decoration: none; |
819 |
| - color: black; |
| 786 | +.sidebar__children { |
| 787 | + padding-left: 1rem; |
820 | 788 | }
|
821 | 789 |
|
822 |
| -.sidebar .sidebar-navigation .collapsible-header { |
| 790 | +.sidebar__toggle { |
823 | 791 | cursor: pointer;
|
824 |
| -} |
825 |
| - |
826 |
| -.sidebar .sidebar-navigation .collapsible-content { |
827 |
| - display: none; |
828 |
| - position: relative; |
829 |
| -} |
830 |
| - |
831 |
| -.sidebar .sidebar-navigation .parent-box.opened, |
832 |
| -.sidebar .sidebar-navigation .box.opened { |
833 |
| - display: none; |
834 |
| -} |
835 |
| - |
836 |
| -.toggle-checkbox:checked ~ .collapsible-header .parent-box.expand, |
837 |
| -.toggle-checkbox:checked ~ .collapsible-header .box.expand { |
838 |
| - display: none; |
839 |
| -} |
840 |
| - |
841 |
| -.toggle-checkbox:checked ~ .collapsible-content { |
842 |
| - display: block; |
843 |
| -} |
844 |
| - |
845 |
| -.toggle-checkbox:checked ~ .collapsible-header .parent-box.opened { |
846 |
| - display: inline-block; |
847 |
| -} |
848 |
| - |
849 |
| -.toggle-checkbox:checked ~ .collapsible-header .box.opened { |
850 |
| - display: block; |
851 |
| -} |
852 |
| - |
853 |
| -/* Every other Sidebar Partial Vertical Line */ |
854 |
| -.toggle-checkbox:checked ~ .collapsible-content::before { |
855 |
| - content: ""; |
856 |
| - position: absolute; |
857 |
| - border-left: black 1px solid; |
858 |
| - left: -8.5px; |
859 |
| - top: -22.5px; |
860 |
| - height: calc(100% + 13.5px); |
861 |
| -} |
862 |
| - |
863 |
| -/* Every other Sidebar Partial Horizontal Lines */ |
864 |
| -.toggle-checkbox:checked ~ .collapsible-content li { |
865 |
| - position: relative; |
866 |
| -} |
867 |
| - |
868 |
| -.collapsible-content .box::after { |
869 |
| - content: ""; |
870 |
| - position: absolute; |
871 |
| - border-top: black 1px solid; |
872 |
| - left: -11.5px; |
873 |
| - width: var(--sidebar-line-width); |
874 |
| - top: 50%; |
875 |
| -} |
876 |
| - |
877 |
| -.collapsible-content .opened::after { |
878 |
| - content: ""; |
879 |
| - position: absolute; |
880 |
| - border-top: black 1px solid; |
881 |
| - left: -12.5px; |
882 |
| - width: var(--sidebar-line-width); |
883 |
| - top: 50%; |
884 |
| -} |
885 |
| - |
886 |
| -.collapsible-content .box-link::after { |
887 |
| - content: ""; |
888 |
| - position: absolute; |
889 |
| - border-top: black 1px solid; |
890 |
| - left: -11.5px; |
891 |
| - width: var(--sidebar-line-width); |
892 |
| - top: 50%; |
893 |
| -} |
894 |
| - |
895 |
| -.selected { |
896 |
| - font-weight: 800; |
897 |
| -} |
898 |
| - |
899 |
| -.sidebar .sidebar-navigation li:first-child { |
900 |
| - margin-top: 16px; |
901 |
| -} |
902 |
| - |
903 |
| -.sidebar .sidebar-navigation ul li .parent-box-link { |
904 |
| - content: ""; |
905 |
| - background-color: black; |
906 |
| - position: absolute; |
907 |
| - width: 1px; |
908 |
| - height: var(--sidebar-line-box-side-length); |
909 |
| - margin-top: var(--sidebar-line-box-top); |
910 |
| - left: calc(0px - var(--sidebar-line-box-left)); |
911 |
| -} |
912 |
| - |
913 |
| -.sidebar .sidebar-navigation ul li .box-link { |
914 |
| - content: ""; |
915 |
| - background-color: black; |
916 |
| - position: absolute; |
917 |
| - width: 1px; |
918 |
| - height: var(--sidebar-line-box-side-length); |
919 |
| - margin-top: var(--sidebar-line-box-top); |
920 |
| - left: var(--sidebar-line-box-left); |
921 |
| -} |
922 |
| - |
923 |
| -.sidebar .sidebar-navigation ul li .parent-box { |
924 |
| - content: ""; |
925 |
| - display: inline-block; |
926 |
| - width: var(--sidebar-line-box-side-length); |
927 |
| - height: var(--sidebar-line-box-side-length); |
928 |
| - vertical-align: middle; |
929 |
| - margin-left: -12px; |
930 |
| - margin-top: -4px; |
931 |
| -} |
932 |
| - |
933 |
| -.sidebar .sidebar-navigation ul li .box { |
934 |
| - content: ""; |
935 |
| - position: absolute; |
936 |
| - width: var(--sidebar-line-box-side-length); |
937 |
| - height: var(--sidebar-line-box-side-length); |
938 |
| - margin-top: var(--sidebar-line-box-top); |
939 |
| - left: var(--sidebar-line-box-left); |
940 |
| -} |
941 |
| - |
942 |
| -.sidebar .sidebar-navigation ul li .expand { |
943 |
| - background-color: black; |
944 |
| -} |
945 |
| - |
946 |
| -.sidebar .sidebar-navigation ul li .opened { |
947 |
| - border: black 1px solid; |
948 |
| -} |
949 |
| - |
950 |
| -.sidebar .sidebar-navigation ul li .current { |
951 |
| - background-color: oklch(var(--color-brand)); |
952 |
| -} |
953 |
| - |
954 |
| -.sidebar .sidebar-navigation ul li .partial-box { |
955 |
| - margin-left: -24px; |
956 |
| -} |
957 |
| - |
958 |
| -.sidebar .sidebar-navigation ul li .partial { |
959 |
| - margin-top: 0; |
960 |
| - top: 5px; |
961 |
| - left: -13px; |
962 |
| -} |
963 |
| - |
964 |
| -/* First Sidebar Nav Vertical Line */ |
965 |
| -.sidebar .sidebar-navigation .parent-collapsible-content { |
966 |
| - position: relative; |
967 |
| -} |
968 |
| - |
969 |
| -.sidebar .sidebar-navigation .parent-collapsible-content:first-child::before { |
970 |
| - content: ""; |
971 |
| - position: absolute; |
972 |
| - border-left: black 1px solid; |
973 |
| - left: -24px; |
974 |
| - top: 10px; |
975 |
| - height: calc(100% - 9px - 10px); |
976 |
| -} |
977 |
| - |
978 |
| -.sidebar |
979 |
| - .sidebar-navigation |
980 |
| - .parent-collapsible-content |
981 |
| - li:not(:only-child) |
982 |
| - a |
983 |
| - + :not(:has(#TableOfContents)) |
984 |
| - li::before { |
| 792 | + background: none; |
985 | 793 | border: none;
|
| 794 | + width: 100%; |
| 795 | + text-align: left; |
| 796 | + padding: 0.25rem 0.75rem; |
| 797 | + border-radius: 5px; |
986 | 798 | }
|
987 | 799 |
|
988 |
| -/* First Sidebar Nav Horizontal Lines */ |
989 |
| -.sidebar |
990 |
| - .sidebar-navigation |
991 |
| - .parent-collapsible-content |
992 |
| - li:not(:only-child) |
993 |
| - .parent-box::before { |
994 |
| - content: ""; |
| 800 | +.sidebar__link { |
995 | 801 | display: block;
|
996 |
| - border-top: black 1px solid; |
997 |
| - margin-left: -12px; |
998 |
| - margin-top: 50%; |
999 |
| - width: var(--sidebar-line-width); |
| 802 | + padding: 0.25rem 0.75rem; |
| 803 | + margin: 2px 0.5rem 2px 0; |
| 804 | + border-radius: 5px; |
| 805 | + color: oklch(0 0 0 / 0.75); |
| 806 | + text-decoration: none; |
1000 | 807 | }
|
1001 | 808 |
|
1002 |
| -.parent-collapsible-content .parent-box-link::after { |
1003 |
| - content: ""; |
1004 |
| - position: absolute; |
1005 |
| - border-top: black 1px solid; |
1006 |
| - left: -11.5px; |
1007 |
| - width: var(--sidebar-line-width); |
1008 |
| - top: 50%; |
| 809 | +.sidebar__link--current { |
| 810 | + color: oklch(var(--color-brand) / 1); |
| 811 | + background-color: oklch(var(--color-brand) / 0.1); |
| 812 | + font-weight: 600; |
1009 | 813 | }
|
1010 | 814 |
|
1011 |
| -.row { |
1012 |
| - display: flex; |
1013 |
| - flex-wrap: nowrap; |
1014 |
| - align-items: flex-start; |
1015 |
| -} |
| 815 | +.sidebar__toc { |
| 816 | + #TableOfContents { |
| 817 | + padding: 0.25rem 0.75rem; |
| 818 | + margin: 2px 0.5rem 2px 0; |
| 819 | + border-radius: 5px; |
| 820 | + color: oklch(0 0 0 / 0.75); |
1016 | 821 |
|
1017 |
| -/* Details/Summary */ |
1018 |
| -details summary { |
1019 |
| - color: oklch(var(--color-brand)); |
1020 |
| - transition: text-decoration-color 0.15s ease-in-out; |
1021 |
| - text-decoration: underline; |
1022 |
| - text-decoration-color: oklch(var(--color-brand) / 0.3); |
| 822 | + &:empty { |
| 823 | + display: none; |
| 824 | + } |
1023 | 825 |
|
1024 |
| - & ~ * { |
1025 |
| - margin-top: 1rem; |
| 826 | + li { |
| 827 | + padding: 0.25rem 0.75rem; |
| 828 | + } |
1026 | 829 | }
|
1027 | 830 | }
|
1028 | 831 |
|
1029 |
| -details summary:hover { |
1030 |
| - text-decoration-color: oklch(var(--color-brand) / 0.8); |
1031 |
| -} |
1032 |
| - |
1033 |
| -details:hover { |
1034 |
| - cursor: pointer; |
1035 |
| -} |
1036 |
| - |
1037 |
| -/* Table of Contents */ |
1038 |
| -#TableOfContents { |
1039 |
| - /* Close all TOC on sidebar */ |
1040 |
| - display: none; |
1041 |
| -} |
1042 |
| - |
1043 |
| -.current ~ nav, |
1044 |
| -.collapsible-content li ul li:has(.current) > nav { |
1045 |
| - /* Open TOC for current page */ |
1046 |
| - display: block !important; |
1047 |
| -} |
1048 |
| - |
1049 |
| -#TableOfContents li:not(:empty) { |
1050 |
| - position: relative; |
1051 |
| - list-style: square; |
1052 |
| -} |
1053 |
| - |
1054 | 832 | /* MARK: Content
|
1055 | 833 | */
|
1056 | 834 | main {
|
|
0 commit comments